From 0417fe49d6be14bb9ebf25b08f67d6a936958d25 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 4 Sep 2015 15:09:22 +0000 Subject: Apppend $prop to et_prop_list only if needed 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 | 6 ++++++ gcc/testsuite/lib/target-supports.exp | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9f692bd..bb4f975 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-09-04 H.J. Lu + + 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 PR sanitizer/67279 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index aad45f9..5e17b26 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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) -- cgit v1.1