testsuite: Fix up FAILs in gfortran testsuite with -fcompare-debug [PR94280]
authorJakub Jelinek <jakub@redhat.com>
Wed, 25 Mar 2020 09:48:27 +0000 (10:48 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 25 Mar 2020 09:48:27 +0000 (10:48 +0100)
These 3 tests use compiler_options() function,
which is inherently incompatible with -fcompare-debug compilation, as it
emits into a string literal in the assembly the exact f951 command line
options, which differs between the two compilations with -fcompare-debug,
where one has -gtoggle and -fcompare-debug-second options added and
different -fdump-final-insns= option argument.

The following patch adds dg-skip-if directives, so that these tests are
ignored during
make check-gfortran RUNTESTFLAGS='--target_board=unix/-fcompare-debug'

2020-03-25  Jakub Jelinek  <jakub@redhat.com>

PR debug/94280
* gfortran.dg/iso_c_binding_compiler_1.f90: Add dg-skip-if for
-fcompare-debug.
* gfortran.dg/iso_c_binding_compiler_3.f90: Likewise.
* gfortran.dg/unlimited_polymorphic_31.f03: Likewise.

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/iso_c_binding_compiler_1.f90
gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90
gcc/testsuite/gfortran.dg/unlimited_polymorphic_31.f03

index 4711a09c2240ffcf1661261e9ca4bd94a33d1e06..59f15af69ac1317b1b9610b0c250c3e5ebd3a39c 100644 (file)
@@ -1,3 +1,11 @@
+2020-03-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/94280
+       * gfortran.dg/iso_c_binding_compiler_1.f90: Add dg-skip-if for
+       -fcompare-debug.
+       * gfortran.dg/iso_c_binding_compiler_3.f90: Likewise.
+       * gfortran.dg/unlimited_polymorphic_31.f03: Likewise.
+
 2020-03-25  Mark Eggleston  <mark.eggleston@codethink.com>
 
        PR fortran/93484
index 8eccb6b9e7a1112ae6b3b325c19f3facdb58b153..d1d2ca975267ae4a1e36a691304d3b78fee8ae95 100644 (file)
@@ -1,4 +1,7 @@
 ! { dg-do link }
+! The compiler_options() function is dependent on the
+! command line options and thus incompatible with -fcompare-debug.
+! { dg-skip-if "-fcompare-debug incompatible test" { *-*-* } { "-fcompare-debug" } { "" } } */
 !
 ! PR fortran/40569
 !
index 71fde9db68f5853e8dc4334b43ca6247ad57e366..d1a0f2f276e9e6432e754d4febf0dc88b8970fa2 100644 (file)
@@ -1,5 +1,8 @@
 ! { dg-do compile }
 ! { dg-options "-Wall" }
+! The compiler_options() function is dependent on the
+! command line options and thus incompatible with -fcompare-debug.
+! { dg-skip-if "-fcompare-debug incompatible test" { *-*-* } { "-fcompare-debug" } { "" } } */
 !
 ! PR fortran/45823
 !
index dd47c34989e74876ece0c2c8ccdde709642e42d8..72d90a06b3ec49455ad3019ced58c649ac8a9e5f 100644 (file)
@@ -1,4 +1,7 @@
 ! { dg-do run }
+! The compiler_options() function is dependent on the
+! command line options and thus incompatible with -fcompare-debug.
+! { dg-skip-if "-fcompare-debug incompatible test" { *-*-* } { "-fcompare-debug" } { "" } } */
 !
 ! Test the fix for PR92785, where the array passed to 'write scalar' was not
 ! normalised to LBOUND = 1.