[PATCH] testsuite: Fix up FAILs in gfortran testsuite with -fcompare-debug [PR94280]
Tobias Burnus
tobias@codesourcery.com
Wed Mar 25 09:41:57 GMT 2020
Hi Jakub,
thanks for the patch and to Martin for doing all the testing.
However, I fail so see why "compiler_version" should be
dependent on the debug flag. In the code, it is just:
"GCC version %s", version_string);
Hence, I in my opinion the comment should be:
"! The compiler_options() function is dependent" …
OK with that change, unless compiler_version() indeed
makes a difference – but then I would like to understand why.
Cheers,
Tobias
On 3/25/20 10:26 AM, Jakub Jelinek via Fortran wrote:
> Hi!
>
> These 3 tests use compiler_version() and/or compiler_options() functions,
> which are inherently incompatible with -fcompare-debug compilation, as they
> emit 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'
>
> Tested on x86_64-linux without (where the 3 tests FAIL) and with the patch, ok for
> trunk?
>
> 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/gfortran.dg/iso_c_binding_compiler_1.f90.jj 2020-01-12 11:54:38.260385543 +0100
> +++ gcc/testsuite/gfortran.dg/iso_c_binding_compiler_1.f90 2020-03-25 10:11:25.175595427 +0100
> @@ -1,4 +1,7 @@
> ! { dg-do link }
> +! The compiler_version() or compiler_options() functions are dependent on the
> +! command line options and thus incompatible with -fcompare-debug.
> +! { dg-skip-if "-fcompare-debug incompatible test" { *-*-* } { "-fcompare-debug" } { "" } } */
> !
> ! PR fortran/40569
> !
> --- gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90.jj 2020-01-12 11:54:38.260385543 +0100
> +++ gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90 2020-03-25 10:11:42.208336885 +0100
> @@ -1,5 +1,8 @@
> ! { dg-do compile }
> ! { dg-options "-Wall" }
> +! The compiler_version() or compiler_options() functions are dependent on the
> +! command line options and thus incompatible with -fcompare-debug.
> +! { dg-skip-if "-fcompare-debug incompatible test" { *-*-* } { "-fcompare-debug" } { "" } } */
> !
> ! PR fortran/45823
> !
> --- gcc/testsuite/gfortran.dg/unlimited_polymorphic_31.f03.jj 2020-03-02 13:33:10.969494283 +0100
> +++ gcc/testsuite/gfortran.dg/unlimited_polymorphic_31.f03 2020-03-25 10:12:08.222942008 +0100
> @@ -1,4 +1,7 @@
> ! { dg-do run }
> +! The compiler_version() or compiler_options() functions are 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.
>
> Jakub
>
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
More information about the Fortran
mailing list