]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite, fortran: Add '-debug-parameters all' when using ifx/ifort
authorNils-Christian Kempke <nils-christian.kempke@intel.com>
Tue, 31 May 2022 14:43:44 +0000 (16:43 +0200)
committerNils-Christian Kempke <nils-christian.kempke@intel.com>
Tue, 31 May 2022 14:44:55 +0000 (16:44 +0200)
In order for ifx and ifort to emit all debug entries, even for unused
parameters in modules we have to define the '-debug-parameters all' flag.

This commit adds it to the ifx-*/ifort-* specific flags in gdb.exp.

gdb/testsuite/lib/gdb.exp

index 87f0a36fe7d5fd729e3d42ddc0c8d92e4cc4ce44..402450152acedfff1a903f111b46ed6ff0930e98 100644 (file)
@@ -4473,6 +4473,8 @@ proc gdb_compile {source dest type options} {
     # Place (and look for) Fortran `.mod` files in the output
     # directory for this specific test.  For Intel compilers the -J
     # option is not supported so instead use the -module flag.
+    # Additionally, Intel compilers need the -debug-parameters flag set to
+    # emit debug info for all parameters in modules.
     if { !$getting_compiler_info && [lsearch -exact $options f90] != -1 } {
        # Fortran compile.
        set mod_path [standard_output_file ""]
@@ -4481,6 +4483,7 @@ proc gdb_compile {source dest type options} {
        } elseif { [test_compiler_info {ifort-*} f90]
                   || [test_compiler_info {ifx-*} f90] } {
            lappend new_options "additional_flags=-module ${mod_path}"
+           lappend new_options "additional_flags=-debug-parameters all"
        }
     }