Denormal behaviour is well defined for IEEE128 long doubles, so
XFAIL some gfortran tests only for targets with the IBM128 long double
ABI.
gcc/testsuite/ChangeLog:
PR testsuite/118127
* lib/target-supports.exp
(check_effective_target_long_double_is_ibm128): New
procedure.
* gfortran.dg/default_format_2.f90: xfail for
long_double_is_ibm128.
* gfortran.dg/default_format_denormal_2.f90: Likewise.
* gfortran.dg/large_real_kind_form_io_2.f90: Likewise.
Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
(cherry picked from commit
d4d4e874dee2d5b0abe5ceb9f2a78e5602e86030)
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
+! { dg-do run { xfail long_double_is_ibm128 } }
! { dg-require-effective-target fortran_large_real }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
-! { dg-do run { xfail powerpc*-*-* } }
+! { dg-do run { xfail long_double_is_ibm128 } }
! { dg-require-effective-target fortran_large_real }
! Test XFAILed on this platform because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
+! { dg-do run { xfail long_double_is_ibm128 } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
! { dg-require-effective-target fortran_large_real }
}]
}
+# Check if long double on the target defaults to the IBM extended format.
+
+proc check_effective_target_long_double_is_ibm128 { } {
+ if { ![istarget powerpc*-*-*] } {
+ return 0
+ }
+
+ return [check_no_compiler_messages long_double_is_ibm128 assembly {
+ #ifndef __LONG_DOUBLE_IBM128__
+ #error "__LONG_DOUBLE_IBM128__ not defined"
+ #endif
+ }]
+}
+
# Return 1 if we can statically link libgfortran, 0 otherwise.
#
# When the target name changes, replace the cached result.