target-supports-dg.exp (dg-require-effective-target): Return early if the test is...
authorJanis Johnson <janisjo@codesourcery.com>
Mon, 27 Jun 2011 18:40:18 +0000 (18:40 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Mon, 27 Jun 2011 18:40:18 +0000 (18:40 +0000)
* lib/target-supports-dg.exp (dg-require-effective-target): Return
early if the test is already being skipped.

From-SVN: r175547

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports-dg.exp

index 462765229df876ed539a2053adab63abb51446b4..6751872c9ae449ac2575f66502102647b8661c85 100644 (file)
@@ -1,5 +1,8 @@
 2011-06-27  Janis Johnson  <janisjo@codesourcery.com>
 
+       * lib/target-supports-dg.exp (dg-require-effective-target): Return
+       early if the test is already being skipped.
+
        * lib/scanasm.exp (dg-scan, scan-assembler-times, scan-assembler-dem,
        scan-assembler-dem-not): For missing file, report unresolved with
        same message as for pass/fail, with reason reported in log file.
index 0e0252dcb4ab67b0a8e2bd1c3092e0eac76faff7..68e250ba87249dee3a0dc3976432a2d078c7754c 100644 (file)
@@ -172,6 +172,12 @@ proc dg-require-effective-target { args } {
     if { [llength $args] < 1 || [llength $args] > 2 } {
        error "syntax error, need a single effective-target keyword with optional selector"
     }
+
+    # Don't bother if we're already skipping the test.
+    upvar dg-do-what dg-do-what
+    if { [lindex ${dg-do-what} 1] == "N" } {
+      return
+    }
     
     # Evaluate selector if present.
     if { [llength $args] == 2 } {
@@ -182,7 +188,6 @@ proc dg-require-effective-target { args } {
     }
 
     if { ![is-effective-target [lindex $args 0]] } {
-       upvar dg-do-what dg-do-what
         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
     }
 }