diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-11-27 11:43:01 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-11-27 10:43:01 +0000 |
commit | 4caddf0b18beea75c69f58804f9f7263733ac37b (patch) | |
tree | 286676772e0e8a9072afb6f1589ef87abcbf5d91 | |
parent | 4eec34e5a495ea71ff735c58e0ac6030a6db553c (diff) | |
download | gcc-4caddf0b18beea75c69f58804f9f7263733ac37b.zip gcc-4caddf0b18beea75c69f58804f9f7263733ac37b.tar.gz gcc-4caddf0b18beea75c69f58804f9f7263733ac37b.tar.bz2 |
compat.exp (compat-obj): New xfaildata parameter.
* lib/compat.exp (compat-obj): New xfaildata parameter.
Use it to set compiler_conditional_xfail_data before compiling.
(compat-get-options): Handle dg-xfail-if.
(compat-execute): Retrieve XFAIL data and pass them to compat-obj.
* gcc.dg/compat/vector-1_x.c: XFAIL on SPARC.
* gcc.dg/compat/vector-1_y.c: Likewise.
* gcc.dg/compat/vector-2_x.c: Likewise.
* gcc.dg/compat/vector-2_y.c: Likewise.
From-SVN: r73989
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compat/vector-1_x.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compat/vector-1_y.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compat/vector-2_x.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compat/vector-2_y.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/compat.exp | 28 |
6 files changed, 35 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f516a1..cd7670f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,16 @@ 2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr> + * lib/compat.exp (compat-obj): New xfaildata parameter. + Use it to set compiler_conditional_xfail_data before compiling. + (compat-get-options): Handle dg-xfail-if. + (compat-execute): Retrieve XFAIL data and pass them to compat-obj. + * gcc.dg/compat/vector-1_x.c: XFAIL on SPARC. + * gcc.dg/compat/vector-1_y.c: Likewise. + * gcc.dg/compat/vector-2_x.c: Likewise. + * gcc.dg/compat/vector-2_y.c: Likewise. + +2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr> + * g++.dg/opt/reg-stack4.C: New test. 2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr> diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_x.c b/gcc/testsuite/gcc.dg/compat/vector-1_x.c index c7e6973..c7503e5 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-1_x.c +++ b/gcc/testsuite/gcc.dg/compat/vector-1_x.c @@ -1,4 +1,5 @@ /* { dg-options "-w" } */ +/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ #include "compat-common.h" #include "vector-defs.h" diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_y.c b/gcc/testsuite/gcc.dg/compat/vector-1_y.c index 1b8b6d7..8aa21e1 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-1_y.c +++ b/gcc/testsuite/gcc.dg/compat/vector-1_y.c @@ -1,4 +1,5 @@ /* { dg-options "-w" } */ +/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ #include "compat-common.h" #include "vector-defs.h" diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_x.c b/gcc/testsuite/gcc.dg/compat/vector-2_x.c index 492878a..9aa49c0 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-2_x.c +++ b/gcc/testsuite/gcc.dg/compat/vector-2_x.c @@ -1,4 +1,5 @@ /* { dg-options "-w" } */ +/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ #include "compat-common.h" #include "vector-defs.h" diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_y.c b/gcc/testsuite/gcc.dg/compat/vector-2_y.c index e100560..283b149 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-2_y.c +++ b/gcc/testsuite/gcc.dg/compat/vector-2_y.c @@ -1,4 +1,5 @@ /* { dg-options "-w" } */ +/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ #include "compat-common.h" #include "vector-defs.h" diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp index 2926d0b..bf40c6e 100644 --- a/gcc/testsuite/lib/compat.exp +++ b/gcc/testsuite/lib/compat.exp @@ -50,6 +50,7 @@ if ![info exists COMPAT_OPTIONS] { set option_list $COMPAT_OPTIONS load_lib dg.exp +load_lib gcc-dg.exp # # compat-obj -- compile to an object file @@ -59,15 +60,18 @@ load_lib dg.exp # OPTALL is the list of compiler options to use with all tests # OPTFILE is the list of compiler options to use with this file # OPTSTR is the options to print with test messages +# XFAILDATA is the xfail data to be passed to the compiler # -proc compat-obj { source dest optall optfile optstr } { +proc compat-obj { source dest optall optfile optstr xfaildata } { global testcase global tool + global compiler_conditional_xfail_data # Set up the options for compiling this file. set options "" lappend options "additional_flags=$optfile $optall" + set compiler_conditional_xfail_data $xfaildata set comp_output [${tool}_target_compile "$source" "$dest" object $options] ${tool}_check_compile "$testcase $dest compile" $optstr $dest $comp_output } @@ -120,7 +124,7 @@ proc compat-run { testname objlist dest optall optfile optstr } { } # -# compat-flags -- get special tool flags to use for a source file +# compat-get-options -- get special tool flags to use for a source file # # SRC is the full patchname of the source file. # The result is a list of options to use. @@ -138,10 +142,15 @@ proc compat-get-options { src } { # dg-options sets a variable called dg-extra-tool-flags. set dg-extra-tool-flags "" + + # dg-xfail-if sets compiler_conditional_xfail_data. + global compiler_conditional_xfail_data + set compiler_conditional_xfail_data "" + set tmp [dg-get-options $src] foreach op $tmp { set cmd [lindex $op 0] - if ![string compare "dg-options" $cmd] { + if { ![string compare "dg-options" $cmd] || ![string compare "dg-xfail-if" $cmd] } { set status [catch "$op" errmsg] if { $status != 0 } { perror "src: $errmsg for \"$op\"\n" @@ -176,6 +185,7 @@ proc compat-execute { src1 sid use_alt } { global verbose global testcase global gluefile + global compiler_conditional_xfail_data # Set up the names of the other source files. regsub "_main.*" $src1 "" base @@ -188,7 +198,9 @@ proc compat-execute { src1 sid use_alt } { # extra flags in *_main.* are also used for linking. set extra_flags_1 [compat-get-options $src1] set extra_flags_2 [compat-get-options $src2] + set compile_xfail_2 $compiler_conditional_xfail_data set extra_flags_3 [compat-get-options $src3] + set compile_xfail_3 $compiler_conditional_xfail_data # Define the names of the object files. regsub "sid" "sid_main_tst.o" $sid obj1 @@ -243,15 +255,15 @@ proc compat-execute { src1 sid use_alt } { # later. Skip this if we don't have an alternate compiler. if { $use_alt != 0 } then { compat-use-alt-compiler - compat-obj "$src2" "$obj2_alt" $alt_option $extra_flags_2 $optstr - compat-obj "$src3" "$obj3_alt" $alt_option $extra_flags_3 $optstr + compat-obj "$src2" "$obj2_alt" $alt_option $extra_flags_2 $optstr $compile_xfail_2 + compat-obj "$src3" "$obj3_alt" $alt_option $extra_flags_3 $optstr $compile_xfail_3 } # Compile pieces with the compiler under test. compat-use-tst-compiler - compat-obj "$src1" "$obj1" $tst_option $extra_flags_1 $optstr - compat-obj "$src2" "$obj2_tst" $tst_option $extra_flags_2 $optstr - compat-obj "$src3" "$obj3_tst" $tst_option $extra_flags_3 $optstr + compat-obj "$src1" "$obj1" $tst_option $extra_flags_1 $optstr "" + compat-obj "$src2" "$obj2_tst" $tst_option $extra_flags_2 $optstr $compile_xfail_2 + compat-obj "$src3" "$obj3_tst" $tst_option $extra_flags_3 $optstr $compile_xfail_3 # Link (using the compiler under test), run, and clean up tests. compat-run "${obj2_tst}-${obj3_tst}" \ |