aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran/library-module-main.f90
diff options
context:
space:
mode:
authorNils-Christian Kempke <nils-christian.kempke@intel.com>2022-05-20 17:44:31 +0200
committerIjaz, Abdul B <abdul.b.ijaz@intel.com>2023-09-08 00:35:18 +0200
commit85832a8c3c91c8ac39b8c6ef50a4894a55b17ab2 (patch)
treedf601295191cd259d305233e32e2b9af54431c3e /gdb/testsuite/gdb.fortran/library-module-main.f90
parent768c40b5eeb19b1c7e0192e399be960e3b03bb31 (diff)
downloadbinutils-85832a8c3c91c8ac39b8c6ef50a4894a55b17ab2.zip
binutils-85832a8c3c91c8ac39b8c6ef50a4894a55b17ab2.tar.gz
binutils-85832a8c3c91c8ac39b8c6ef50a4894a55b17ab2.tar.bz2
testsuite, fortran: make mixed-lang-stack less compiler dependent
In the gdb.fortran/mixed-lang-stack.exp test when somewhere deep in a bunch of nested function calls we issue and test a 'info args' command for the mixed_func_1b function (when in that function's frame). The signature of the function looks like subroutine mixed_func_1b(a, b, c, d, e, g) use type_module implicit none integer :: a real(kind=4) :: b real(kind=8) :: c complex(kind=4) :: d character(len=*) :: e character(len=:), allocatable :: f TYPE(MyType) :: g and usually one would expect arguments a, b, c, d, e, and g to be emitted here. However, due to some compiler dependent treatment of the e array the actual output in the test (with gfortran/ifx) is (gdb) info args a = 1 b = 2 c = 3 d = (4,5) e = 'abcdef' g = ( a = 1.5, b = 2.5 ) _e = 6 where the compiler generated '_e' is emitted as the length of e. While ifort also generates an additional length argument, the naming (which is up to the compilers here I think, I could not find anything in the Fortran standard about this) is different and we see (gdb) info args a = 1 b = 2 c = 3 d = (4,5) e = 'abcdef' g = ( a = 1.5, b = 2.5 ) .tmp.E.len_V$4a = 6 To make both outputs pass the test, I kept the additional argument for now and made the regex for the emitted name of the last variable match any arbitrary name. Approved-by: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.fortran/library-module-main.f90')
0 files changed, 0 insertions, 0 deletions