From 46dc515752bcda939c5c71a0578726acd3167e73 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 24 May 1998 16:21:23 +0000 Subject: [PATCH] old-dejagnu.exp: All tests fail if we got an internal compiler error for the line. * lib/old-dejagnu.exp: All tests fail if we got an internal compiler error for the line. Don't run multiple tests for the same line. From-SVN: r20028 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/old-dejagnu.exp | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 06b83ffdb43..4a6eb05b504 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +1998-05-24 Jason Merrill + + * lib/old-dejagnu.exp: All tests fail if we got an internal compiler + error for the line. Don't run multiple tests for the same line. + Sat May 23 23:27:10 1998 Jeffrey A Law (law@cygnus.com) * gcc.dg/980523-1.c: New test. diff --git a/gcc/testsuite/lib/old-dejagnu.exp b/gcc/testsuite/lib/old-dejagnu.exp index 45eb8ac46ea..e029b23e00d 100644 --- a/gcc/testsuite/lib/old-dejagnu.exp +++ b/gcc/testsuite/lib/old-dejagnu.exp @@ -409,6 +409,7 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { #send_user "\nold_dejagnu.exp: message = :$message:\n\n" #send_user "\nold_dejagnu.exp: message length = [llength $message]\n\n" + set last_line 0 foreach i $message { #send_user "\nold_dejagnu.exp: i = :$i:\n\n" @@ -417,7 +418,21 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { # in the source file. If we find any, success! set line [lindex $i 0] set pattern [lindex $i 2] - if [regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output] then { + + # Multiple tests one one line don't work, because we remove all + # messages on the line for the first test. So skip later ones. + if { $line == $last_line } { + continue + } + set last_line $line + + # If we crashed on this line, all tests fail. + if [regexp "(^|\n)\[^\n\]+:$line: Internal compiler error\[^\n\]*" $comp_output ] { + regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output + set comp_output [string trimleft $comp_output] + set ok fail + set uhoh fail + } elseif [regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output] { set comp_output [string trimleft $comp_output] set ok pass set uhoh fail -- 2.30.2