> -----Original Message----- > From: Christophe Lyon [mailto:christophe.l...@linaro.org] > Sent: Monday, December 11, 2017 11:24 > To: Tamar Christina <tamar.christ...@arm.com> > Cc: gcc-patches@gcc.gnu.org; nd <n...@arm.com>; Ramana Radhakrishnan > <ramana.radhakrish...@arm.com>; Richard Earnshaw > <richard.earns...@arm.com>; ni...@redhat.com; Kyrylo Tkachov > <kyrylo.tkac...@arm.com> > Subject: Re: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c > > On 11 December 2017 at 11:35, Tamar Christina <tamar.christ...@arm.com> > wrote: > > Hi Christoph, > > > >> -----Original Message----- > >> From: Christophe Lyon [mailto:christophe.l...@linaro.org] > >> Sent: Monday, December 11, 2017 09:02 > >> To: Tamar Christina <tamar.christ...@arm.com> > >> Cc: gcc-patches@gcc.gnu.org; nd <n...@arm.com>; Ramana Radhakrishnan > >> <ramana.radhakrish...@arm.com>; Richard Earnshaw > >> <richard.earns...@arm.com>; ni...@redhat.com; Kyrylo Tkachov > >> <kyrylo.tkac...@arm.com> > >> Subject: Re: [PATCH][GCC][ARM] Fix failing testcase > >> pragma_fpu_attribute.c > >> > >> On 8 December 2017 at 15:53, Tamar Christina > >> <tamar.christ...@arm.com> > >> wrote: > >> > Hi All, > >> > > >> > My previous patch had two issues with the new test cases. > >> > It seems that depending on which DejaGnu version you have > >> > dg-additional-options will add the options before or after the ones > >> > added by the test suite. Which means I can't use it to override the > >> > default options. > >> > > >> > For this I use a pragma now and place the pragma before GCC needs > >> > to emit any code. Which in turn means it doesn't emit the .fpu > >> > directive for the first switching of fpus. > >> > > >> > Secondly, because of the usage of neon I also need to guard against > >> arm_neon_ok. > >> > > >> > Regtested on arm-none-eabi and no regressions. > >> > > >> > Ok for trunk? > >> > > >> > > >> > gcc/testsuite/ > >> > 2017-12-08 Tamar Christina <tamar.christ...@arm.com> > >> > > >> > PR target/82641 > >> > * gcc.target/arm/pragma_fpu_attribute.c: New. > >> > * gcc.target/arm/pragma_fpu_attribute_2.c: New. > >> > > >> > -- > >> > >> Hi Tamar, > >> > >> We must be testing/building differently, since your patch doesn't > >> work for me. > >> > >> The compiler complains when including arm_neon.h because: > >> "NEON intrinsics not available with the soft-float ABI." > >> > >> I'm using a recent dejagnu (1.6+). and for instance on arm-none-eabi, > >> the testcase is compiled with -std=gnu99, but no other ABI-related > >> option. Why does it work for you? > > > > This is a good question, it also works on our internal overnight testing > infrastructure. > > At least the neon bit, it was the reason I noticed the discrepancy with the > Dejagnu versions. > > > > It also works when I build natively using just configure && make. Could be > something in the configure flags. > > Looking back at it, if the vanilla compiler doesn't support neon I can > > see the test failing. But fixing it means Turning on neon and then turning > > it > off after the include. Which makes the test do too many things. > > What are your configure flags? > Can you can&paste the command line used to compile the testcase (from > gcc.log) ?
They are: Schedule of variations: arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard /build-arm-none-eabi/obj/gcc2/gcc/xgcc -B/build-arm-none-eabi/obj/gcc2/gcc/ /src/gcc/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c -marm -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors -std=gnu99 -ffat-lto-objects -S -specs=aprofile-validation.specs -Wa,-mno-warn-deprecated -o pragma_fpu_attribute_2.s /build-arm-none-eabi/obj/gcc2/gcc/xgcc -B/build-arm-none-eabi/obj/gcc2/gcc/ /src/gcc/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c -marm -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors -std=gnu99 -ffat-lto-objects -S -specs=aprofile-validation.specs -Wa,-mno-warn-deprecated -o pragma_fpu_attribute.s /build-arm-none-eabi/obj/gcc2/gcc/xgcc -B/build-arm-none-eabi/obj/gcc2/gcc/ /src/gcc/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c -mthumb -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors -std=gnu99 -ffat-lto-objects -S -specs=aprofile-validation.specs -Wa,-mno-warn-deprecated -o pragma_fpu_attribute_2.s /build-arm-none-eabi/obj/gcc2/gcc/xgcc -B/build-arm-none-eabi/obj/gcc2/gcc/ /src/gcc/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c -mthumb -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors -std=gnu99 -ffat-lto-objects -S -specs=aprofile-validation.specs -Wa,-mno-warn-deprecated -o pragma_fpu_attribute.s It's also weird that you only see one of the testcases failing. The pragma_fpu_attribute.c and pragma_fpu_attribute_2.c should have the exact same issues. > > Thanks > > > > > I will try to think of a testcase that doesn't require neon, if I can't > > I'll just > remove the tests. > > They weren't being tested before and if there's no way to reliably > > test changing fpu options on ARM Then there's no point having them. > > > > Yes, that's becoming way too complex for the purpose :( I think I can do one using the fmla instructions. So will try that next. > > > Thanks, > > Tamar > > > >> > >> Christophe