diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp index d6759aa0b4b..11d73d9f1f7 100644 --- a/gcc/testsuite/lib/fortran-torture.exp +++ b/gcc/testsuite/lib/fortran-torture.exp @@ -138,8 +138,8 @@ proc fortran-torture-compile { src option } { return } - if [string match "*internal compiler error*" $comp_output] then { - gfortran_fail $testcase "$option (internal compiler error)" + if [regexp -line -- "internal compiler error.*" $comp_output ice] then { + gfortran_fail $testcase "$option ($ice)" catch { remote_file build delete $output } return } @@ -263,8 +263,8 @@ proc fortran-torture-execute { src } { continue } - if [string match "*internal compiler error*" $comp_output] then { - gfortran_fail $testcase "$option (internal compiler error)" + if [regexp -line -- "internal compiler error.*" $comp_output ice] then { + gfortran_fail $testcase "$option ($ice)" catch { remote_file build delete $executable } continue } diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp index d17308d0f86..66df4e1c6aa 100644 --- a/gcc/testsuite/lib/gcc-defs.exp +++ b/gcc/testsuite/lib/gcc-defs.exp @@ -38,8 +38,8 @@ proc ${tool}_check_compile {testcase option objname gcc_output} { return 0 } - if [string match "*internal compiler error*" $gcc_output] then { - ${tool}_fail $testcase "$option (internal compiler error)" + if [regexp -line -- "internal compiler error.*" $gcc_output ice] then { + ${tool}_fail $testcase "$option ($ice)" return 0 } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 78a6c3651ef..464059608b8 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -315,13 +315,13 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { # to avoid a second failure for excess errors. # "Error reporting routines re-entered" ICE says "Internal" rather than # "internal", so match that too. - if [string match {*[Ii]nternal compiler error*} $comp_output] { + if [regexp -line -- {[Ii]nternal compiler error.*} $comp_output ice] { upvar 2 name name if { $expect_ice == 0 } { - fail "$name (internal compiler error)" + fail "$name ($ice)" } else { # We expected an ICE and we got it. - xfail "$name (internal compiler error)" + xfail "$name ($ice)" # Prune the ICE from the output. set comp_output [prune_ices $comp_output] } diff --git a/gcc/testsuite/lib/go-torture.exp b/gcc/testsuite/lib/go-torture.exp index 28247a1902d..adeae36f916 100644 --- a/gcc/testsuite/lib/go-torture.exp +++ b/gcc/testsuite/lib/go-torture.exp @@ -88,8 +88,8 @@ proc go-torture-compile { src option } { return } - if [string match "*internal compiler error*" $comp_output] then { - go_fail $testcase "$option (internal compiler error)" + if [regexp -line -- "internal compiler error.*" $comp_output ice] then { + go_fail $testcase "$option ($ice)" catch { remote_file build delete $output } return } @@ -224,8 +224,8 @@ proc go-torture-execute { src } { continue } - if [string match "*internal compiler error*" $comp_output] then { - go_fail $testcase "$option (internal compiler error)" + if [regexp -line -- "internal compiler error.*" $comp_output ice] then { + go_fail $testcase "$option ($ice)" catch { remote_file build delete $executable } continue }