[patch] Fix PR rtl-optimization/20017 - Take 2
Jakub Jelinek
jakub@redhat.com
Tue Feb 22 19:10:00 GMT 2005
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
More information about the Gcc-patches
mailing list