On Thu, Sep 01, 2022 at 04:57:59PM +0800, Kewen.Lin wrote: > on 2022/8/31 22:13, Peter Bergner wrote: > > On 8/31/22 4:33 AM, Kewen.Lin wrote: > >> @@ -1,7 +1,8 @@ > >> /* { dg-do compile { target { powerpc*-*-* } } } */ > >> /* { dg-skip-if "" { powerpc*-*-aix* } } */ > >> -/* { dg-options "-O2 -mpowerpc64" } */ > >> /* { dg-require-effective-target ilp32 } */ > >> +/* { dg-options "-O2 -mpowerpc64" } */ > >> +/* { dg-require-effective-target has_arch_ppc64 } */ > > > > With many of our recent patches moving the dg-options before any > > dg-requires-effectice-target so it affects the results of the > > dg-requires-effectice-target test, this looks like it's backwards > > from that process. I understand why, so I think an explicit comment > > here in the test case explaining why it's after in this case. > > Just so in a few years when we come back to this test case, we > > won't accidentally undo this change. > > Oops, the diff shows it's like "after", but it's actually still "before". :) > The dg-options is meant to be placed before the succeeding has_arch_ppc64 > effective target which is supposed to use dg-options to compile. I felt > good to let ilp32 checking go first then has_arch_ppc64, so moved dg-option > downward.
These two are independent, but apparently we have a bug here, which will make what you did malfunction in some cases -- the test will not run for ilp32 if you have RUNTESTFLAGS {-m32,-m64}. It should not make a difference, -mpowerpc64 and -m32 should be wholly independent, and their order should not matter. So the order of the /* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -mpowerpc64" } */ lines should not make a difference either. But it does :-( Segher