This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR rtl-optimization/20017 - Take 2


On Tue, Feb 22, 2005 at 10:47:48AM -0500, Kazu Hirata wrote:
> Hi Roger,
> 
> > > 	PR rtl-optimization/20017.
> > > 	* gcc.dg/pr20017.c: New.
> > 
> > This is OK for mainline.
> 
> Thanks for an approval.  I just noticed that I shouldn't use:
> 
> /* { dg-do compile } */
> /* { dg-options "-O1 -march=i386" } */
> 
> Instead, I should use:
> 
> /* { dg-do compile { target i?86-*-* } } */
> /* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
> /* { dg-options "-O1 -march=i386" } */
> 
> so that I won't break other targets.

IMHO that's a wrong thing to do.
Either you should just stick the testcase under gcc.c-torture/compile/
so that it gets tested with all -O* options (I think many people configure
the compiler for i386-*-* target), or if you really want it in gcc.dg,
it should be something like:
/* { dg-do compile } */
/* { dg-options "-O1" } */
/* { dg-options "-O1 -march=i386" { target { i?86-*-* && ilp32 } } } */

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]