diff options
author | Bernhard Heckel <bernhard.heckel@intel.com> | 2017-09-08 15:11:47 +0200 |
---|---|---|
committer | Tim Wiederhake <tim.wiederhake@intel.com> | 2017-09-08 15:11:47 +0200 |
commit | 9e9af4be9f656f82922e6aaeb3b6421508403ea4 (patch) | |
tree | 279db5741801eaca86e1958b5bf8f633136dbac1 /gdb/testsuite/gdb.fortran/vla-value.exp | |
parent | a5ad232b3e6f39cf2955a8ec3aa4355359a9f72e (diff) | |
download | binutils-9e9af4be9f656f82922e6aaeb3b6421508403ea4.zip binutils-9e9af4be9f656f82922e6aaeb3b6421508403ea4.tar.gz binutils-9e9af4be9f656f82922e6aaeb3b6421508403ea4.tar.bz2 |
Fortran: Testsuite, fix differences in type naming.
Diffstat (limited to 'gdb/testsuite/gdb.fortran/vla-value.exp')
-rw-r--r-- | gdb/testsuite/gdb.fortran/vla-value.exp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp index 6ceceab..3dd1aae 100644 --- a/gdb/testsuite/gdb.fortran/vla-value.exp +++ b/gdb/testsuite/gdb.fortran/vla-value.exp @@ -14,6 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. standard_testfile "vla.f90" +load_lib "fortran.exp" if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ {debug f90 quiet}] } { @@ -25,12 +26,16 @@ if ![runto_main] { return -1 } +# Depending on the compiler being used, +# the type names can be printed differently. +set real [fortran_real4] + # Try to access values in non allocated VLA gdb_breakpoint [gdb_get_line_number "vla1-init"] gdb_continue_to_breakpoint "vla1-init" gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1" gdb_test "print &vla1" \ - " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not allocated>\\\)\\\)\\\) $hex" \ + " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\)\\\)\\\) $hex" \ "print non-allocated &vla1" gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \ "print member in non-allocated vla1 (1)" @@ -51,7 +56,7 @@ with_timeout_factor 15 { "step over value assignment of vla1" } gdb_test "print &vla1" \ - " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \ + " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \ "print allocated &vla1" gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)" gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)" @@ -71,7 +76,7 @@ gdb_test "print vla1(9, 9, 9)" " = 999" \ # Try to access values in undefined pointer to VLA (dangling) gdb_test "print pvla" " = <not associated>" "print undefined pvla" gdb_test "print &pvla" \ - " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not associated>\\\)\\\)\\\) $hex" \ + " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\)\\\)\\\) $hex" \ "print non-associated &pvla" gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \ "print undefined pvla(1,3,8)" @@ -80,7 +85,7 @@ gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated gdb_breakpoint [gdb_get_line_number "pvla-associated"] gdb_continue_to_breakpoint "pvla-associated" gdb_test "print &pvla" \ - " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \ + " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \ "print associated &pvla" gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)" gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)" |