Apppend $prop to et_prop_list only if needed
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 4 Sep 2015 15:09:22 +0000 (15:09 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 4 Sep 2015 15:09:22 +0000 (08:09 -0700)
PR testsuite/67450
* lib/target-supports.exp (check_cached_effective_target):
Apppend $prop to et_prop_list only if needed.

From-SVN: r227492

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

index 9f692bdd58259210f6c6623ac42f291bbd646160..bb4f975e3633033b824fe24478babb5fcf824521 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR testsuite/67450
+       * lib/target-supports.exp (check_cached_effective_target):
+       Apppend $prop to et_prop_list only if needed.
+
 2015-09-04  Marek Polacek  <polacek@redhat.com>
 
        PR sanitizer/67279
index aad45f96c2006859034722416d2f278134de93f8..5e17b2657bb1d2d45f1669e8415d137e9439164f 100644 (file)
@@ -125,7 +125,10 @@ proc check_cached_effective_target { prop args } {
        verbose "check_cached_effective_target $prop: checking $target" 2
        set et_cache($prop,target) $target
        set et_cache($prop,value) [uplevel eval $args]
-       lappend et_prop_list $prop
+       if {![info exists et_prop_list]
+           || [lsearch $et_prop_list $prop] < 0} {
+           lappend et_prop_list $prop
+       }
        verbose "check_cached_effective_target cached list is now: $et_prop_list" 2
     }
     set value $et_cache($prop,value)