commit 41fe3b50b3d92931fc99ef15f86cc9299e0c617e Author: Sandra Loosemore Date: Sat Sep 4 18:36:39 2021 -0700 Skip gfortran.dg/PR100914.f90 on targets that don't provide quadmath.h. This test uses the __complex128 type, which is provided by the header which may not be available on all targets. 2021-09-04 Sandra Loosemore gcc/testsuite/ * lib/target-supports.exp (check_effective_target_quadmath_h): New function. * gfortran.dg/PR100914.f90: Use it. Add comments. diff --git a/gcc/testsuite/gfortran.dg/PR100914.f90 b/gcc/testsuite/gfortran.dg/PR100914.f90 index 64b3335..aff405a 100644 --- a/gcc/testsuite/gfortran.dg/PR100914.f90 +++ b/gcc/testsuite/gfortran.dg/PR100914.f90 @@ -1,7 +1,10 @@ ! Fails on x86 targets where sizeof(long double) == 16. ! { dg-do run { xfail { { x86_64*-*-* i?86*-*-* } && longdouble128 } } } -! { dg-additional-sources PR100914.c } +! Requires Fortran support for __float128. ! { dg-require-effective-target fortran_real_c_float128 } +! Requires __complex128 type from quadmath.h. +! { dg-require-effective-target quadmath_h } +! { dg-additional-sources PR100914.c } ! ! Test the fix for PR100914 ! diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ad8f011..072b776 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8340,6 +8340,14 @@ proc check_effective_target_libc_has_complex_functions {} { }] } +# Return true if this target has the quadmath.h header. + +proc check_effective_target_quadmath_h {} { + return [check_no_compiler_messages quadmath_h object { + #include + }] +} + # Return 1 if # (a) an error of a few ULP is expected in string to floating-point # conversion functions; and