old-dejagnu.exp: Make it possible to XFAIL a test that causes an ICE.
authorMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 23 Aug 1998 15:21:34 +0000 (15:21 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 23 Aug 1998 15:21:34 +0000 (15:21 +0000)
* lib/old-dejagnu.exp: Make it possible to XFAIL a test that
causes an ICE.

From-SVN: r21917

gcc/testsuite/g++.old-deja/g++.robertl/eb27.C
gcc/testsuite/lib/old-dejagnu.exp

index 7dfd1a3b08d53c29bb52037eff014ea7a683c6b5..630f8e47df860ea9fde0c435200c208e81270786 100644 (file)
@@ -3,7 +3,7 @@
 */
 /* (w) 4.9.97 by Kurt Garloff <K.Garloff@ping.de> */
 // Special g++ Options:
-// excess errors test - XFAIL *-*-*
+// crash test - XFAIL *-*-*
 
 #include <iostream.h>
 
index 3884b8e280a0b8ee19edf742a2eec9953da97712..ceae14b78cffa9dd5f47f8738f0a74172c890269 100644 (file)
@@ -382,6 +382,14 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
        set message [concat $message $tmp]
     }
 
+    set expect_crash \
+      [process-option $prog "crash test - " "a crash" CRASH $text]
+    if {$expect_crash == "XCRASH"} then {
+       set expect_crash 0
+    } else {
+       set expect_crash 1
+    }
+
 #
 #  run the compiler and analyze the results
 #
@@ -395,9 +403,12 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
     set comp_output [prune_warnings $comp_output]
 
     if [string match "*Internal compiler error*" $comp_output] then {
+        if $expect_crash then {
+           setup_xfail "*-*-*"
+       }
         fail "$name caused compiler crash"
-       remote_file build delete $output
-       return 1
+        remote_file build delete $output
+        return 1
     }
 
     #send_user "\nold_dejagnu.exp: comp_output1 = :$comp_output:\n\n"