Message ID | DB5PR08MB10303AD2A9F43949D04355F9837C0@DB5PR08MB1030.eurprd08.prod.outlook.com |
---|---|
State | New |
Headers | show |
Series | [COMMITTED] Fix pr88850 test | expand |
Hi Wilco, On Tue, 19 Feb 2019 at 19:44, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote: > > Fix pr88850.c testcase which was failing in hardfp environments. > > Committed as obvious. > > ChangeLog: > 2019-02-19 Wilco Dijkstra <wdijkstr@arm.com> > > * gcc.target/arm/pr88850.c: Block -mfloat-abi override. > > -- > diff --git a/gcc/testsuite/gcc.target/arm/pr88850.c b/gcc/testsuite/gcc.target/arm/pr88850.c > index 6edd6bcee54dbc843b539ff67399ee7a30a707e4..67fe942a8b8755c18ce8971c3b48011613988a6a 100644 > --- a/gcc/testsuite/gcc.target/arm/pr88850.c > +++ b/gcc/testsuite/gcc.target/arm/pr88850.c > @@ -1,6 +1,7 @@ > /* PR target/88850 */ > /* { dg-do compile } */ > -/* { dg-additional-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ > +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ Does this mean the test would be skipped if one forces -mfloat-abi=softfp and not if one uses -mfloat-abi=soft ? > +/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ > /* { dg-require-effective-target arm_neon_ok } */ > > typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8))); >
Hi Christophe, > +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ > Does this mean the test would be skipped if one forces > -mfloat-abi=softfp and not if one uses -mfloat-abi=soft ? Yes it seems it is. No idea why the testsuite is so broken, obviously option overrides should be added before the test-specific options are appended. Due to this bug there are hundreds of these skip-if required in the Arm testsuite alone. Cheers, Wilco
On Wed, 20 Feb 2019 at 13:35, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote: > > Hi Christophe, > > > +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ > > Does this mean the test would be skipped if one forces > > -mfloat-abi=softfp and not if one uses -mfloat-abi=soft ? > > Yes it seems it is. No idea why the testsuite is so broken, obviously option overrides should > be added before the test-specific options are appended. Due to this bug there are hundreds > of these skip-if required in the Arm testsuite alone. Option overrides are appended/prepended depending on dejagnu version :-( But my question was more: why skip the test if one forces -mfloat-abi=softfp while you have this very same option in the dg-additional-options ? Isn't it a typo that -mfloat-abi=soft in the "exclude" should use floatfp? Christophe > > Cheers, > Wilco
Hi Christophe, > Option overrides are appended/prepended depending on dejagnu version :-( Why stop there? Dejagnu could increase the fun of testing by randomizing option ordering. > But my question was more: why skip the test if one forces > -mfloat-abi=softfp while you have this very same option in the > dg-additional-options ? > Isn't it a typo that -mfloat-abi=soft in the "exclude" should use floatfp? I don't know, I just copied the magic hack from other tests. Do you know of a better way of writing this? Wilco
On Wed, 20 Feb 2019 at 15:17, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote: > > Hi Christophe, > > > Option overrides are appended/prepended depending on dejagnu version :-( > > Why stop there? Dejagnu could increase the fun of testing by randomizing > option ordering. > > > But my question was more: why skip the test if one forces > > -mfloat-abi=softfp while you have this very same option in the > > dg-additional-options ? > > Isn't it a typo that -mfloat-abi=soft in the "exclude" should use floatfp? > > I don't know, I just copied the magic hack from other tests. Do you know Not quite, I think. All the other tests in gcc.target/arm that use dg-skip-if with -mfloat-abi have the "exclude" parameter matching the option in dg-options (when there is an explicit "exclude" and dg-options is used). So I suggest: --- a/gcc/testsuite/gcc.target/arm/pr88850.c +++ b/gcc/testsuite/gcc.target/arm/pr88850.c @@ -1,6 +1,6 @@ /* PR target/88850 */ /* { dg-do compile } */ -/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=softfp" } } */ /* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ /* { dg-require-effective-target arm_neon_ok } */ Christophe > of a better way of writing this? > > Wilco
Hi Christophe, >> > But my question was more: why skip the test if one forces >> > -mfloat-abi=softfp while you have this very same option in the >> > dg-additional-options ? >> > Isn't it a typo that -mfloat-abi=soft in the "exclude" should use floatfp? >> >> I don't know, I just copied the magic hack from other tests. Do you know > > Not quite, I think. > All the other tests in gcc.target/arm that use dg-skip-if with > -mfloat-abi have the > "exclude" parameter matching the option in dg-options (when there is an explicit > "exclude" and dg-options is used). OK thanks, I've updated the test as suggested and also fixed pr88850-2.c in the same way: Like the pr88850.c test, also fix the pr88850-2.c testcase which was failing in hardfp environments. Committed as obvious. ChangeLog: 2019-02-21 Wilco Dijkstra <wdijkstr@arm.com> * gcc.target/arm/pr88850-2.c: Block -mfloat-abi override. * gcc.target/arm/pr88850.c: Use -mfloat-abi=softfp. -- diff --git a/gcc/testsuite/gcc.target/arm/pr88850-2.c b/gcc/testsuite/gcc.target/arm/pr88850-2.c index 7a1aec55dc70625bd6306e8d6bf094e11afe81bc..f33361ca11d5120726bef2eb8accee8a8b0e2aed 100644 --- a/gcc/testsuite/gcc.target/arm/pr88850-2.c +++ b/gcc/testsuite/gcc.target/arm/pr88850-2.c @@ -1,5 +1,6 @@ /* PR target/88850. */ /* { dg-do compile } */ +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=softfp" } } */ /* { dg-additional-options "-O2 -march=armv7-a -fdump-rtl-final" } */ /* { dg-add-options arm_neon_softfp_fp16 } */ /* { dg-require-effective-target arm_neon_softfp_fp16_ok } */ diff --git a/gcc/testsuite/gcc.target/arm/pr88850.c b/gcc/testsuite/gcc.target/arm/pr88850.c index 67fe942a8b8755c18ce8971c3b48011613988a6a..365c9d73696b82653a9f86bf27431a73beee4df4 100644 --- a/gcc/testsuite/gcc.target/arm/pr88850.c +++ b/gcc/testsuite/gcc.target/arm/pr88850.c @@ -1,6 +1,6 @@ /* PR target/88850 */ /* { dg-do compile } */ -/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=softfp" } } */ /* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ /* { dg-require-effective-target arm_neon_ok } */
diff --git a/gcc/testsuite/gcc.target/arm/pr88850.c b/gcc/testsuite/gcc.target/arm/pr88850.c index 6edd6bcee54dbc843b539ff67399ee7a30a707e4..67fe942a8b8755c18ce8971c3b48011613988a6a 100644 --- a/gcc/testsuite/gcc.target/arm/pr88850.c +++ b/gcc/testsuite/gcc.target/arm/pr88850.c @@ -1,6 +1,7 @@ /* PR target/88850 */ /* { dg-do compile } */ -/* { dg-additional-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ +/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdump-rtl-final" } */ /* { dg-require-effective-target arm_neon_ok } */ typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8)));