+2021-07-05 Tom de Vries <tdevries@suse.de>
+
+ * gdb.fortran/ptype-on-functions.exp: Allow both $integer8 and
+ $integer4 for size of string length.
+
2021-07-03 Joel Brobecker <brobecker@adacore.com>
* gdb.base/default.exp: Change $_gdb_major to 12.
set logical4 [fortran_logical4]
set integer8 [fortran_int8]
+# A fortran string parameter is passed as a char *, and an additional
+# argument str_ for the string length. The type used for the string length
+# argument is size_t, but for gcc 7 and earlier, the actual type is int
+# instead ( see
+# https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html ).
+set stringlen ($integer8|$integer4)
+
if {[test_compiler_info {clang-*}]} {
set some_module_class_type "Type number"
set some_module_aux_info ", $integer8 \\(10\\)"
"type = PTR TO -> \\( $integer4 \\(\\) \\(${fun_ptr_arg}\\) \\)"
gdb_test "ptype say_string" \
- "type = void \\(character\[^,\]+, $integer8\\)"
+ "type = void \\(character\[^,\]+, $stringlen\\)"
set say_array_artificial_first_arg ""
if {[test_compiler_info {clang-*}]} {