+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.
#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"
# 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