[v2] testsuite/118127: Pass fortran tests on ppc64le for IEEE128 long doubles
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Denormal behaviour is well defined for IEEE128 long doubles, so don't
XFAIL some gfortran tests on ppc64le when configured with the IEEE128
long double ABI.
gcc/testsuite/ChangeLog:
PR testsuite/118127
* lib/target-supports.exp
(check_effective_target_ppc_default_long_double_ibm): New
procedure.
* gfortran.dg/default_format_2.f90: Don't xfail for
ppc_default_long_double_ibm.
* 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>
---
gcc/testsuite/gfortran.dg/default_format_2.f90 | 2 +-
.../gfortran.dg/default_format_denormal_2.f90 | 2 +-
.../gfortran.dg/large_real_kind_form_io_2.f90 | 2 +-
gcc/testsuite/lib/target-supports.exp | 18 ++++++++++++++++++
4 files changed, 21 insertions(+), 3 deletions(-)
Comments
On 2025-01-10 07:50, Siddhesh Poyarekar wrote:
> Denormal behaviour is well defined for IEEE128 long doubles, so don't
> XFAIL some gfortran tests on ppc64le when configured with the IEEE128
> long double ABI.
>
> gcc/testsuite/ChangeLog:
>
> PR testsuite/118127
> * lib/target-supports.exp
> (check_effective_target_ppc_default_long_double_ibm): New
> procedure.
> * gfortran.dg/default_format_2.f90: Don't xfail for
> ppc_default_long_double_ibm.
> * 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>
Sorry, my test just concluded and it doesn't XFAIL correctly on ibm long
double ABI. I'll take another stab at this.
Sid
@@ -1,4 +1,4 @@
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
+! { dg-do run { xfail ppc_default_long_double_ibm } }
! { 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
@@ -1,4 +1,4 @@
-! { dg-do run { xfail powerpc*-*-* } }
+! { dg-do run { xfail ppc_default_long_double_ibm } }
! { 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
@@ -1,4 +1,4 @@
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
+! { dg-do run { xfail ppc_default_long_double_ibm } }
! 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 }
@@ -1826,6 +1826,24 @@ proc check_effective_target_fortran_integer_16 { } {
}]
}
+# Check if the PPC target defaults to the IBM long double format.
+
+proc check_effective_target_ppc_default_long_double_ibm { } {
+ if { ![istarget powerpc*-*-*] } {
+ return 0
+ }
+
+ return [check_runtime_nocache ppc_default_long_double_ibm {
+ ! Fortran
+ program default_long_double_ibm
+ integer, parameter :: kl = selected_real_kind (precision (0.0_8) + 1)
+ if (precision (0.0_kl) != 31) then
+ call exit(1)
+ end if
+ end program default_long_double_ibm
+ }]
+}
+
# Return 1 if we can statically link libgfortran, 0 otherwise.
#
# When the target name changes, replace the cached result.