@@ -1,4 +1,3 @@
-/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g" } */
#include "valid-1.h"/* { dg-warning "created with .none. debug info, but used with" } */
@@ -1,4 +1,3 @@
-/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g0" } */
#include "valid-1b.h"
@@ -100,6 +100,27 @@ proc dg-flags-pch { subdir test otherflags options suffix } {
# For the rest, the default is to compile to .s.
set dg-do-what-default compile
+ # Process the target selectors to see whether the remaining
+ # part of the test should be skipped.
+ #
+ # ??? This doesn't currently handle flag-specific skips,
+ # based on dg-options.
+ set dg-do-what [list compile "" P]
+ set dg-extra-tool-flags ""
+ foreach op [dg-get-options "./$bname$suffix"] {
+ switch [lindex $op 0] {
+ dg-require-effective-target -
+ dg-skip-if {
+ if { [catch "$op" msg] } {
+ perror "$bname$suffix: $msg for \"$op\""
+ }
+ }
+ }
+ }
+ if { [lindex ${dg-do-what} 1] == "N" } {
+ continue
+ }
+
set have_errs [llength [grep $test "{\[ \t\]\+dg-error\[ \t\]\+.*\[ \t\]\+}"]]
if { [ file_on_host exists "$bname$suffix.gch" ] } {
@@ -134,8 +155,7 @@ proc dg-flags-pch { subdir test otherflags options suffix } {
fail "$nshort $flags assembly comparison"
}
}
- } elseif { $pch_unsupported_debug == 0 \
- || [llength [grep $test "{\[ \t\]\+dg-require-effective-target\[ \t\]\+pch_supported_debug\[ \t\]\+.*\[ \t\]\+}"]] > 0 } {
+ } else {
verbose -log "pch file '$bname$suffix.gch' missing"
fail "$nshort $flags"
if { !$have_errs } {
@@ -334,6 +334,23 @@ proc check-flags { args } {
# The args are within another list; pull them out.
set args [lindex $args 0]
+ # The next two arguments are optional. If they were not specified,
+ # use the defaults.
+ if { [llength $args] == 2 } {
+ lappend args "*"
+ }
+ if { [llength $args] == 3 } {
+ lappend args ""
+ }
+
+ # If the option strings are the defaults, or the same as the
+ # defaults, there is no need to call check_conditional_xfail to
+ # compare them to the actual options.
+ if { [string compare [lindex $args 2] "*"] == 0
+ && [string compare [lindex $args 3] "" ] == 0 } {
+ return 1
+ }
+
# Start the list with a dummy tool name so the list will match "*"
# if there are no flags.
set compiler_flags " toolname "
@@ -350,26 +367,9 @@ proc check-flags { args } {
append compiler_flags "[board_info $dest multilib_flags] "
}
- # The next two arguments are optional. If they were not specified,
- # use the defaults.
- if { [llength $args] == 2 } {
- lappend $args [list "*"]
- }
- if { [llength $args] == 3 } {
- lappend $args [list ""]
- }
-
- # If the option strings are the defaults, or the same as the
- # defaults, there is no need to call check_conditional_xfail to
- # compare them to the actual options.
- if { [string compare [lindex $args 2] "*"] == 0
- && [string compare [lindex $args 3] "" ] == 0 } {
- set result 1
- } else {
- # The target list might be an effective-target keyword, so replace
- # the original list with "*-*-*", since we already know it matches.
- set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]]
- }
+ # The target list might be an effective-target keyword, so replace
+ # the original list with "*-*-*", since we already know it matches.
+ set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]]
# Any value in this variable was left over from an earlier test.
set compiler_flags ""