old-dejagnu.exp: All tests fail if we got an internal compiler error for the line.
authorJason Merrill <jason@yorick.cygnus.com>
Sun, 24 May 1998 16:21:23 +0000 (16:21 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 24 May 1998 16:21:23 +0000 (12:21 -0400)
* 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
gcc/testsuite/lib/old-dejagnu.exp

index 06b83ffdb43a3e8bf75dfe7196eeb5a42234b7df..4a6eb05b504e2cb3783a1aa7bc5358f7346e0d77 100644 (file)
@@ -1,3 +1,8 @@
+1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * 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.
index 45eb8ac46eacbd8c0c2736755717c6b3e6d1a7f8..e029b23e00daf07301c19e7d16b167817bc1cfdb 100644 (file)
@@ -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