]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Update test pattern in ptype-on-functions.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 15 Jul 2020 15:05:24 +0000 (16:05 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 15 Jul 2020 15:12:17 +0000 (16:12 +0100)
It was pointed out that the recently added test
gdb.fortran/ptype-on-functions.exp fails on older versions of
gfortran.  This is because the ABI for passing string lengths changed
from a 4-byte to 8-byte value (on some targets).

This change is documented here:
  https://gcc.gnu.org/gcc-8/changes.html.

  Character variables longer than HUGE(0) elements are now possible on
  64-bit targets. Note that this changes the procedure call ABI for
  all procedures with character arguments on 64-bit targets, as the
  type of the hidden character length argument has changed. The hidden
  character length argument is now of type INTEGER(C_SIZE_T).

This commit just relaxes the pattern to accept any size of integer for
the string length argument.

gdb/testsuite/ChangeLog:

* gdb.fortran/ptype-on-functions.exp: Make the result pattern more
generic.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/ptype-on-functions.exp

index d056485e5a7914db1c11a31cb119fb1e4fcc85ee..9559355905d19cbbe338753dd06955ec0dd2984e 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-15  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb.fortran/ptype-on-functions.exp: Make the result pattern more
+       generic.
+
 2020-07-15  Tom de Vries  <tdevries@suse.de>
 
        * gdb.trace/entry-values.exp: Expect "call" instead of "callq" if
index dde6f48b85374ef668d5c65b724da730b61a63a9..9d447530c264b8a64f8345f2a1a796809571beb4 100644 (file)
@@ -45,7 +45,7 @@ gdb_test "ptype fun_ptr" \
     "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\) \\(REF TO -> \\( integer\\(kind=4\\) \\)\\) \\)"
 
 gdb_test "ptype say_string" \
-    "type = void \\(character\\*\\(\\*\\), integer\\(kind=8\\)\\)"
+    "type = void \\(character\\*\\(\\*\\), integer\\(kind=\\d+\\)\\)"
 
 gdb_test "ptype say_array" \
     "type = void \\(integer\\(kind=4\\) \\(:,:\\)\\)"