From 70c4c000ff88462085c30f8e160994a6df4bbb20 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 23 Aug 1998 15:21:34 +0000 Subject: [PATCH] old-dejagnu.exp: Make it possible to XFAIL a test that causes an ICE. * 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 | 2 +- gcc/testsuite/lib/old-dejagnu.exp | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C index 7dfd1a3b08d..630f8e47df8 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C @@ -3,7 +3,7 @@ */ /* (w) 4.9.97 by Kurt Garloff */ // Special g++ Options: -// excess errors test - XFAIL *-*-* +// crash test - XFAIL *-*-* #include diff --git a/gcc/testsuite/lib/old-dejagnu.exp b/gcc/testsuite/lib/old-dejagnu.exp index 3884b8e280a..ceae14b78cf 100644 --- a/gcc/testsuite/lib/old-dejagnu.exp +++ b/gcc/testsuite/lib/old-dejagnu.exp @@ -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" -- 2.30.2