PATCH for Re: more evidence that failing to detect ICE's is a significant problem
Mark Mitchell
mark@markmitchell.com
Sun Aug 9 13:45:00 GMT 1998
I'm not sure who maintains old-dejagnu.exp, so I'm not sure who to ask
for permission to check this in. This patch makes handling of ICE's
just like handling of SIGBUS/SIGSEGV, which seems fair.
On the mainline, it detects the error you (Joe) referred to
(explicit69.C) as well as one other crash.
I think that this patch should go on the mainline and on the 1.1
branch so that people testing 1.1 can have its benefits.
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
1998-08-09 Mark Mitchell <mark@markmitchell.com>
* lib/old-dejagnu.exp: Revise handling of `Internal compiler
error'.
Index: old-dejagnu.exp
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/lib/old-dejagnu.exp,v
retrieving revision 1.6
diff -c -p -r1.6 old-dejagnu.exp
*** old-dejagnu.exp 1998/05/24 16:21:23 1.6
--- old-dejagnu.exp 1998/08/09 20:40:09
*************** proc old-dejagnu { compiler prog cflagsx
*** 404,409 ****
--- 404,414 ----
remote_file build delete $output
return 1
}
+ if [string match "*Internal compiler error*" $comp_output] then {
+ fail "$name caused compiler crash"
+ remote_file build delete $output
+ return 1
+ }
#send_user "\nold_dejagnu.exp: comp_output1 = :$comp_output:\n\n"
#send_user "\nold_dejagnu.exp: message = :$message:\n\n"
*************** proc old-dejagnu { compiler prog cflagsx
*** 426,438 ****
}
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
--- 431,437 ----
}
set last_line $line
! if [regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output] {
set comp_output [string trimleft $comp_output]
set ok pass
set uhoh fail
More information about the Gcc-patches
mailing list