On Wed, 8 Jan 2025 at 14:17, Richard Earnshaw (lists) <richard.earns...@arm.com> wrote: > > On 19/12/2024 12:17, Christophe Lyon wrote: > > Without this patch, testcases using arm_v8_3a_fp16_complex_neon fail > > to compile on arm-linux-gnueabihf with > > fatal error: gnu/stubs-soft.h: No such file or directory > > because they are actually compiled with > > -mfloat-abi=softfp -mfpu=auto -mcpu=unset -march=armv8.3-a+fp16 > > > > Fix this by including stdint.h in the sample code for the effective-target. > > > > This makes these tests PASS instead of being UNRESOLVED: > > fast-math-bb-slp-complex-add-half-float.c > > fast-math-bb-slp-complex-mla-half-float.c > > fast-math-bb-slp-complex-mls-half-float.c > > fast-math-bb-slp-complex-mul-half-float.c > > fast-math-complex-add-half-float.c > > fast-math-complex-mla-half-float.c > > fast-math-complex-mls-half-float.c > > fast-math-complex-mul-half-float.c > > > > except for two new > > FAIL: gcc.dg/vect/complex/fast-math-complex-mls-half-float.c scan-tree-dump > > vect "Found COMPLEX_ADD_ROT270" > > (and the same with -flto -ffat-lto-objects) > > > > gcc/testsuite/ChangeLog: > > > > * lib/target-supports.exp > > (check_effective_target_arm_v8_3a_fp16_complex_neon_ok_nocache): > > Include stdint.h. > > --- > > gcc/testsuite/lib/target-supports.exp | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/gcc/testsuite/lib/target-supports.exp > > b/gcc/testsuite/lib/target-supports.exp > > index a16e9534ccd..9f4e2700dd2 100644 > > --- a/gcc/testsuite/lib/target-supports.exp > > +++ b/gcc/testsuite/lib/target-supports.exp > > @@ -13298,6 +13298,7 @@ proc > > check_effective_target_arm_v8_3a_fp16_complex_neon_ok_nocache { } { > > #if !defined (__ARM_FEATURE_COMPLEX) > > #error "__ARM_FEATURE_COMPLEX not defined" > > #endif > > + #include <stdint.h> > > } "$flags -mcpu=unset -march=armv8.3-a+fp16"] } { > > set et_arm_v8_3a_fp16_complex_neon_flags \ > > "$flags -mcpu=unset -march=armv8.3-a+fp16" > > I'm somewhat surprised that a test in gcc.dg/vect/complex is using an > unguarded arm_... set of options. Tamar, I think this test is one of yours: > how is this supposed to work on non-arm platforms? >
IIUC add_options_for_arm_v8_3a_fp16_complex_neon calls check_effective_target_arm_v8_3a_fp16_complex_neon_ok which returns 0 on non-arm / non-aaarch64 platforms, thus keeps "$flags" unchanged. I was a bit surprised too :-) Many (not most) of the check_effective_target_arm* do NOT have the: if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } { return 0; } Thanks, Christophe > R.