Commit 46dc5157 by Jason Merrill Committed by Jason Merrill

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
parent 60f06d2f
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) Sat May 23 23:27:10 1998 Jeffrey A Law (law@cygnus.com)
* gcc.dg/980523-1.c: New test. * gcc.dg/980523-1.c: New test.
......
...@@ -409,6 +409,7 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { ...@@ -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 = :$message:\n\n"
#send_user "\nold_dejagnu.exp: message length = [llength $message]\n\n" #send_user "\nold_dejagnu.exp: message length = [llength $message]\n\n"
set last_line 0
foreach i $message { foreach i $message {
#send_user "\nold_dejagnu.exp: i = :$i:\n\n" #send_user "\nold_dejagnu.exp: i = :$i:\n\n"
...@@ -417,7 +418,21 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { ...@@ -417,7 +418,21 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
# in the source file. If we find any, success! # in the source file. If we find any, success!
set line [lindex $i 0] set line [lindex $i 0]
set pattern [lindex $i 2] 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 comp_output [string trimleft $comp_output]
set ok pass set ok pass
set uhoh fail set uhoh fail
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment