From: Tom de Vries Date: Sat, 20 Sep 2025 12:48:57 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.fortran X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2fa4d56ba2faaf8e528a7de89d7503b3316888a;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.fortran Running tclint on the test-cases in gdb.fortran shows a few problems. Fix these. Tested on x86_64-linux. --- diff --git a/gdb/tclint.toml b/gdb/tclint.toml index 3b43523789f..3dcfe72e4e0 100644 --- a/gdb/tclint.toml +++ b/gdb/tclint.toml @@ -25,7 +25,6 @@ exclude = [ "gdb/testsuite/gdb.btrace", "gdb/testsuite/gdb.cp", "gdb/testsuite/gdb.dwarf2", -"gdb/testsuite/gdb.fortran", "gdb/testsuite/gdb.mi", "gdb/testsuite/gdb.python", "gdb/testsuite/gdb.threads", diff --git a/gdb/testsuite/gdb.fortran/allocated.exp b/gdb/testsuite/gdb.fortran/allocated.exp index a000b6e27b0..7cf1367e6e6 100644 --- a/gdb/testsuite/gdb.fortran/allocated.exp +++ b/gdb/testsuite/gdb.fortran/allocated.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp index fb8ee864297..9efd95fabfd 100644 --- a/gdb/testsuite/gdb.fortran/array-bounds.exp +++ b/gdb/testsuite/gdb.fortran/array-bounds.exp @@ -34,8 +34,8 @@ if {![fortran_runto_main]} { # GCC outputs incorrect range debug info for -m32, gcc PR debug/54934. set expect_xfail \ [expr \ - [test_compiler_info {gfortran-*} f90] \ - && [is_ilp32_target]] + {[test_compiler_info {gfortran-*} f90] + && [is_ilp32_target]}] set re_ok [string_to_regexp (4294967296:4294967297)] set re_xfail [string_to_regexp (0:1)] diff --git a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp index 8c19c85836f..72c7c5e9add 100644 --- a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } @@ -53,7 +53,7 @@ gdb_test_multiple $cmd $cmd { # slice. for { set j 1 } { $j < 6 } { incr j } { for { set i 1 } { $i < 6 } { incr i } { - set val [expr ((($i - 1) * 2) + (($j - 1) * 20)) + 1] + set val [expr {((($i - 1) * 2) + (($j - 1) * 20)) + 1}] gdb_test "print ${varname} ($i,$j)" " = $val" } } @@ -106,7 +106,7 @@ gdb_test "print str (26:1:-2)" " = 'zxvtrpnljhfdb'" # existing value in memory. gdb_test_no_output "set fortran repack-array-slices on" set element_size [get_integer_valueof "sizeof (array (1,1))" "unknown"] -set slice_size [expr $element_size * 4] +set slice_size [expr {$element_size * 4}] gdb_test_no_output "set max-value-size $slice_size" gdb_test "print array (1:2, 1:2)" "= \\(\\(1, 2\\) \\(11, 12\\)\\)" gdb_test "print array (2:3, 2:3)" "= \\(\\(12, 13\\) \\(22, 23\\)\\)" diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp index f0b649b73ef..7d4f96e041c 100644 --- a/gdb/testsuite/gdb.fortran/array-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices.exp @@ -58,7 +58,7 @@ proc run_test { repack } { clean_restart ${::testfile} - if ![fortran_runto_main] { + if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/associated.exp b/gdb/testsuite/gdb.fortran/associated.exp index c900ce7ea77..92972200270 100644 --- a/gdb/testsuite/gdb.fortran/associated.exp +++ b/gdb/testsuite/gdb.fortran/associated.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/assumedrank.exp b/gdb/testsuite/gdb.fortran/assumedrank.exp index 159608f3854..45e8c09469b 100644 --- a/gdb/testsuite/gdb.fortran/assumedrank.exp +++ b/gdb/testsuite/gdb.fortran/assumedrank.exp @@ -32,7 +32,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { untested "could not run to main" return -1 } diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp index 75298cccb8d..96ccdd707e7 100644 --- a/gdb/testsuite/gdb.fortran/call-no-debug.exp +++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp @@ -67,7 +67,7 @@ proc find_mangled_name { name } { set some_func [find_mangled_name "some_func"] set string_func [find_mangled_name "string_func"] -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/charset.exp b/gdb/testsuite/gdb.fortran/charset.exp index 0f5ee3d8ee0..cd117d42dd5 100644 --- a/gdb/testsuite/gdb.fortran/charset.exp +++ b/gdb/testsuite/gdb.fortran/charset.exp @@ -30,7 +30,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug addi return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return } diff --git a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp index 241cc83ade8..d860b2c1e18 100644 --- a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp +++ b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp @@ -26,7 +26,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp index 6f3e55db502..f27f3ad3b3b 100644 --- a/gdb/testsuite/gdb.fortran/common-block.exp +++ b/gdb/testsuite/gdb.fortran/common-block.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . diff --git a/gdb/testsuite/gdb.fortran/completion.exp b/gdb/testsuite/gdb.fortran/completion.exp index 0961207fafc..5038251305d 100644 --- a/gdb/testsuite/gdb.fortran/completion.exp +++ b/gdb/testsuite/gdb.fortran/completion.exp @@ -26,7 +26,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp index 6e84b24d92e..d872ad68487 100644 --- a/gdb/testsuite/gdb.fortran/debug-expr.exp +++ b/gdb/testsuite/gdb.fortran/debug-expr.exp @@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} { return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/empty-string.exp b/gdb/testsuite/gdb.fortran/empty-string.exp index 531af45b592..17ee5e5c8da 100644 --- a/gdb/testsuite/gdb.fortran/empty-string.exp +++ b/gdb/testsuite/gdb.fortran/empty-string.exp @@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} { return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp index 72efb564457..323a2abe7a2 100644 --- a/gdb/testsuite/gdb.fortran/exprs.exp +++ b/gdb/testsuite/gdb.fortran/exprs.exp @@ -232,7 +232,7 @@ proc test_arithmetic_expressions {} { gdb_test "p 6.0 / 3.0" " = 2" "real divided by real" # Test exponentiation with various operands - + gdb_test "p 2 ** 3" " = 8" "int powered by int" gdb_test "p 2 ** 2 ** 3" " = 256" "combined exponentiation expression" gdb_test "p (2 ** 2) ** 3" " = 64" "combined exponentiation expression in specified order" diff --git a/gdb/testsuite/gdb.fortran/huge.exp b/gdb/testsuite/gdb.fortran/huge.exp index 47bac7805ad..f7c50d7a897 100644 --- a/gdb/testsuite/gdb.fortran/huge.exp +++ b/gdb/testsuite/gdb.fortran/huge.exp @@ -27,7 +27,7 @@ load_lib fortran.exp standard_testfile .F90 -set max [expr 2 * 1024 * 1024] +set max [expr {2 * 1024 * 1024}] set min 16 set opts {} @@ -35,7 +35,7 @@ lappend opts debug lappend opts f90 set compilation_succeeded 0 -for { set size [expr $max] } { $size >= $min } { set size [expr $size / 2] } { +for { set size [expr {$max}] } { $size >= $min } { set size [expr {$size / 2}] } { set try_opts [concat $opts [list additional_flags=-DCRASH_GDB=$size]] with_test_prefix CRASH_GDB=$size { if { [build_executable $testfile.exp $testfile $srcfile $try_opts] == -1 } { @@ -92,6 +92,6 @@ save_vars { timeout } { unsupported $test } else { # At 112 passes with and without the fix, so use 111. - gdb_assert {$space_used < [expr 111 * 4 * $size] } $test + gdb_assert {$space_used < [expr {111 * 4 * $size}] } $test } } diff --git a/gdb/testsuite/gdb.fortran/info-main.exp b/gdb/testsuite/gdb.fortran/info-main.exp index 4178886ecf4..6cdfd1542e3 100644 --- a/gdb/testsuite/gdb.fortran/info-main.exp +++ b/gdb/testsuite/gdb.fortran/info-main.exp @@ -29,7 +29,7 @@ save_vars { GDBFLAGS } { gdb_test "info main" "simple" "info main prior to start" -if ![fortran_runto_main] { +if {![fortran_runto_main]} { untested "could not run to main" return -1 } diff --git a/gdb/testsuite/gdb.fortran/intrinsic-precedence.exp b/gdb/testsuite/gdb.fortran/intrinsic-precedence.exp index 02f5ff31e7e..93f1da9ecfc 100644 --- a/gdb/testsuite/gdb.fortran/intrinsic-precedence.exp +++ b/gdb/testsuite/gdb.fortran/intrinsic-precedence.exp @@ -33,7 +33,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/intvar-array.exp b/gdb/testsuite/gdb.fortran/intvar-array.exp index 68b674cd3ec..52314edcb36 100644 --- a/gdb/testsuite/gdb.fortran/intvar-array.exp +++ b/gdb/testsuite/gdb.fortran/intvar-array.exp @@ -25,7 +25,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/intvar-dynamic-types.exp b/gdb/testsuite/gdb.fortran/intvar-dynamic-types.exp index b28bf5c872e..201f0205c2e 100644 --- a/gdb/testsuite/gdb.fortran/intvar-dynamic-types.exp +++ b/gdb/testsuite/gdb.fortran/intvar-dynamic-types.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp index f8e256c5167..143c5be98a6 100644 --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } @@ -160,7 +160,7 @@ while { $test_count < 500 } { # Finally, check that asking for a dimension above the valid # range gives the expected error. - set bad_dim [expr $upper_dim + 1] + set bad_dim [expr {$upper_dim + 1}] gdb_test "p lbound ($array_name, $bad_dim)" \ "LBOUND dimension must be from 1 to $upper_dim" \ "check error message for lbound of dim = $bad_dim" diff --git a/gdb/testsuite/gdb.fortran/library-module.exp b/gdb/testsuite/gdb.fortran/library-module.exp index ec35ef16b4e..07867eed134 100644 --- a/gdb/testsuite/gdb.fortran/library-module.exp +++ b/gdb/testsuite/gdb.fortran/library-module.exp @@ -17,7 +17,7 @@ load_lib fortran.exp require allow_fortran_tests -standard_testfile library-module-main.f90 +standard_testfile library-module-main.f90 set srclibfile ${testfile}-lib.f90 set libfile [standard_output_file ${testfile}-lib.so] diff --git a/gdb/testsuite/gdb.fortran/limited-length.exp b/gdb/testsuite/gdb.fortran/limited-length.exp index 38c528614b0..9c65d48b024 100644 --- a/gdb/testsuite/gdb.fortran/limited-length.exp +++ b/gdb/testsuite/gdb.fortran/limited-length.exp @@ -80,7 +80,7 @@ with_test_prefix "with standard max-value size" { # Set the max-value-size so we can only print 50 elements. set elements 50 set elem_size [get_valueof "/d" "sizeof(large_1d_array(1))" "*unknown*"] -gdb_test_no_output "set max-value-size [expr $elem_size * $elements]" +gdb_test_no_output "set max-value-size [expr {$elem_size * $elements}]" with_test_prefix "with reduced max-value size" { gdb_test "print large_4d_array" \ diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp index b59fb2c10ab..e3b9fb5e67b 100644 --- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp +++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp @@ -45,7 +45,7 @@ proc run_tests { lang } { clean_restart ${::testfile} - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index 30988a23072..2496f662977 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}] } # Test automatic language detection before the inferior starts. It tests the # effect of expected: -# (gdb) show language +# (gdb) show language # The current source language is "auto; currently fortran". gdb_test "p modmany::var_i" " = 14" "stopped language detection" @@ -131,6 +131,6 @@ gdb_test "show language" {The current source language is "(auto; currently )?for # gcc-4.4.2: The main program is always $fmain in .symtab so "runto" above # works. But DWARF DW_TAG_subprogram contains the name specified by # the "program" Fortran statement. -if [gdb_breakpoint "module"] { +if {[gdb_breakpoint "module"]} { pass "setting breakpoint at module" } diff --git a/gdb/testsuite/gdb.fortran/multi-dim.exp b/gdb/testsuite/gdb.fortran/multi-dim.exp index efd225a09f7..0a719fef642 100644 --- a/gdb/testsuite/gdb.fortran/multi-dim.exp +++ b/gdb/testsuite/gdb.fortran/multi-dim.exp @@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug f90} return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return } diff --git a/gdb/testsuite/gdb.fortran/namelist.exp b/gdb/testsuite/gdb.fortran/namelist.exp index 10846cf7697..fce63142558 100644 --- a/gdb/testsuite/gdb.fortran/namelist.exp +++ b/gdb/testsuite/gdb.fortran/namelist.exp @@ -38,8 +38,8 @@ gdb_continue_to_breakpoint "Display namelist" # DW_TAG_namelist is supported starting gcc 4.9. set supported [expr \ - [test_compiler_info {gfortran-*} f90] \ - && [gcc_major_version {gfortran-*} f90] >= 4.9] + {[test_compiler_info {gfortran-*} f90] + && [gcc_major_version {gfortran-*} f90] >= 4.9}] if { $supported } { gdb_test "ptype nml" \ "type = Type nml\r\n *$int :: a\r\n *$int :: b\r\n *End Type nml" diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.exp b/gdb/testsuite/gdb.fortran/nested-funcs.exp index 63917c553fc..c92a8c10667 100755 --- a/gdb/testsuite/gdb.fortran/nested-funcs.exp +++ b/gdb/testsuite/gdb.fortran/nested-funcs.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . # This testcase is supposed to test DWARF static link which is usually -# used together with nested functions. +# used together with nested functions. require allow_fortran_tests diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuite/gdb.fortran/oop_extend_type.exp index f2e64e9d056..9f443d9fe2d 100755 --- a/gdb/testsuite/gdb.fortran/oop_extend_type.exp +++ b/gdb/testsuite/gdb.fortran/oop_extend_type.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { perror "could not run to main" return -1 } diff --git a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp index 99206160e9e..47ca74a229d 100644 --- a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp +++ b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortran/print_type.exp index c08f501f74f..6d2457f13ee 100755 --- a/gdb/testsuite/gdb.fortran/print_type.exp +++ b/gdb/testsuite/gdb.fortran/print_type.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/rank.exp b/gdb/testsuite/gdb.fortran/rank.exp index c61ae9839ef..e998ead9cb1 100644 --- a/gdb/testsuite/gdb.fortran/rank.exp +++ b/gdb/testsuite/gdb.fortran/rank.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/shape.exp b/gdb/testsuite/gdb.fortran/shape.exp index e525bf74c3f..7a6bc9beab9 100644 --- a/gdb/testsuite/gdb.fortran/shape.exp +++ b/gdb/testsuite/gdb.fortran/shape.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp index bca971d5f91..ab0411a67ec 100644 --- a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp +++ b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp @@ -48,12 +48,12 @@ reset_called_flags # a(x,y) .OR./.AND. a(a,b) correctly. foreach_with_prefix truth_table_index {1 2 3 4} { gdb_test "p truth_table($truth_table_index, 1) .OR. truth_table($truth_table_index, 2)" \ - "[expr $truth_table_index > 1 ? \".TRUE.\" : \".FALSE.\"]" + "[expr {$truth_table_index > 1 ? ".TRUE." : ".FALSE."}]" } foreach_with_prefix truth_table_index {1 2 3 4} { gdb_test "p truth_table($truth_table_index, 1) .AND. truth_table($truth_table_index, 2)" \ - "[expr $truth_table_index > 3 ? \".TRUE.\" : \".FALSE.\"]" + "[expr {$truth_table_index > 3 ? ".TRUE." : ".FALSE."}]" } # Vary number of function arguments to skip. @@ -78,14 +78,14 @@ with_test_prefix "nested call not skipped" { gdb_test "p function_one_arg(.FALSE. .OR. function_no_arg())" \ " = .TRUE." gdb_test "p calls" \ - " = \\\( function_no_arg_called = [expr $prime + 1], function_no_arg_false_called = $prime, function_one_arg_called = [expr $prime + 1], function_two_arg_called = $prime, function_array_called = $prime \\\)" + " = \\\( function_no_arg_called = [expr {$prime + 1}], function_no_arg_false_called = $prime, function_one_arg_called = [expr {$prime + 1}], function_two_arg_called = $prime, function_array_called = $prime \\\)" } with_test_prefix "nested call skipped" { gdb_test "p function_one_arg(.TRUE. .OR. function_no_arg())" \ " = .TRUE." gdb_test "p calls" \ - " = \\\( function_no_arg_called = [expr $prime + 1], function_no_arg_false_called = $prime, function_one_arg_called = [expr $prime + 2], function_two_arg_called = $prime, function_array_called = $prime \\\)" + " = \\\( function_no_arg_called = [expr {$prime + 1}], function_no_arg_false_called = $prime, function_one_arg_called = [expr {$prime + 2}], function_two_arg_called = $prime, function_array_called = $prime \\\)" } # Vary number of components in the expression to skip. diff --git a/gdb/testsuite/gdb.fortran/size.exp b/gdb/testsuite/gdb.fortran/size.exp index dd6340fab8a..5bc7db21287 100644 --- a/gdb/testsuite/gdb.fortran/size.exp +++ b/gdb/testsuite/gdb.fortran/size.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/sizeof.exp b/gdb/testsuite/gdb.fortran/sizeof.exp index aa2210731d5..c0a9fd3c0fe 100644 --- a/gdb/testsuite/gdb.fortran/sizeof.exp +++ b/gdb/testsuite/gdb.fortran/sizeof.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp index c444228a862..03bc2ce6799 100644 --- a/gdb/testsuite/gdb.fortran/types.exp +++ b/gdb/testsuite/gdb.fortran/types.exp @@ -25,7 +25,7 @@ proc test_integer_literal_types_accepted {} { # Test various decimal values. # Should be integer*4 probably. - gdb_test "pt 123" "type = int" + gdb_test "pt 123" "type = int" } proc test_character_literal_types_accepted {} { diff --git a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp index 8d9fc253a75..b766e1d2c45 100644 --- a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp +++ b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-array.exp b/gdb/testsuite/gdb.fortran/vla-array.exp index 092a19aef9a..7c2d48de4b3 100644 --- a/gdb/testsuite/gdb.fortran/vla-array.exp +++ b/gdb/testsuite/gdb.fortran/vla-array.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { untested "could not run to main" return -1 } @@ -34,12 +34,12 @@ gdb_continue_to_breakpoint "arr_vla1-print" # GFortran emits DW_TAG_structure_type for strings and it has only # DW_AT_declaration tag. This results in in gdb. -if [test_compiler_info "gfortran*" f90] { setup_xfail *-*-* gcc/101826 } +if {[test_compiler_info "gfortran*" f90]} { setup_xfail *-*-* gcc/101826 } gdb_test "print arr_vla1" \ " = \\\('vlaaryvlaary', 'vlaaryvlaary', 'vlaaryvlaary', 'vlaaryvlaary', 'vlaaryvlaary'\\\)" \ "print vla string array" -if [test_compiler_info "gfortran*" f90] { setup_xfail *-*-* gcc/101826 } +if {[test_compiler_info "gfortran*" f90]} { setup_xfail *-*-* gcc/101826 } gdb_test "ptype arr_vla1" \ "type = character\\*12 \\(5\\)" \ "print variable length string array type" diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.exp b/gdb/testsuite/gdb.fortran/vla-datatypes.exp index a4ea89d78c1..6f2bb3ab1ee 100644 --- a/gdb/testsuite/gdb.fortran/vla-datatypes.exp +++ b/gdb/testsuite/gdb.fortran/vla-datatypes.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ # check that all fortran standard datatypes will be # handled correctly when using as VLA's -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-history.exp b/gdb/testsuite/gdb.fortran/vla-history.exp index d51ded4c368..6dcc31c0a1b 100644 --- a/gdb/testsuite/gdb.fortran/vla-history.exp +++ b/gdb/testsuite/gdb.fortran/vla-history.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp index 1a4efc7b113..9f63e600ca6 100644 --- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp +++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp index 7d957870718..6809d8cb5dd 100644 --- a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp +++ b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp index ca75afce397..4c72d623f01 100644 --- a/gdb/testsuite/gdb.fortran/vla-ptype.exp +++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp index da9eaa19c52..ede677fafa2 100644 --- a/gdb/testsuite/gdb.fortran/vla-sizeof.exp +++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp index f33231a627c..7cd9cd8bbd3 100644 --- a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp +++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp index 01d717e44a2..ef40dffc5a3 100644 --- a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp +++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub.exp b/gdb/testsuite/gdb.fortran/vla-value-sub.exp index e3103bddab0..566125e6a7c 100644 --- a/gdb/testsuite/gdb.fortran/vla-value-sub.exp +++ b/gdb/testsuite/gdb.fortran/vla-value-sub.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp index fc2864bfc9e..687b14cd737 100644 --- a/gdb/testsuite/gdb.fortran/vla-value.exp +++ b/gdb/testsuite/gdb.fortran/vla-value.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp index 8cbddc1d977..8891eac3959 100644 --- a/gdb/testsuite/gdb.fortran/whatis_type.exp +++ b/gdb/testsuite/gdb.fortran/whatis_type.exp @@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![fortran_runto_main] { +if {![fortran_runto_main]} { return }