[PATCH] arm: [testsuite] fix lob tests for -mfloat-abi=hard

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Thu Nov 26 14:34:26 GMT 2020


On 26/11/2020 13:53, Andrea Corallo via Gcc-patches wrote:
> Hi all,
> 
> I'd like to submit the following simple patch to clean some Low Loop
> Overhead test failing on hard float configurations.
> 
> lob2.c and lob5.c are failing with: "'-mfloat-abi=hard': selected 
> processor lacks an FPU".
> 
> lob3.c and lob5.c got "-mfloat-abi=soft and -mfloat-abi=hard may not
> be used together".
> 
> Okay for trunk?
> 
> Thanks
>   Andrea
>   
> 

I think it would be better to try to do this with suitable
require-effective-target rules (or something similar).  Forcing options
should generally be a last resort and in particular using -mfpu should
really be avoided as we're trying to move away from that.

diff --git a/gcc/testsuite/gcc.target/arm/lob4.c
b/gcc/testsuite/gcc.target/arm/lob4.c
...
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {
"-marm" "-mcpu=*" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {
"-marm" "-mcpu=*" "-mfloat-abi=hard" } } */
 /* { dg-options "-march=armv8.1-m.main -mthumb -O3 --save-temps
-mfloat-abi=soft" } */
 /* { dg-require-effective-target arm_softfloat } */

Why is the effective target arm_softfloat not solving this particular
conflict?

R.


More information about the Gcc-patches mailing list