From: Jakub Jelinek Date: Fri, 1 Feb 2013 15:01:02 +0000 (+0100) Subject: * lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse. X-Git-Tag: upstream/12.2.0~71474 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c050cbe9b41307e5586e9c28001d5b15c2a16327;p=platform%2Fupstream%2Fgcc.git * lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse. From-SVN: r195666 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cbc7cb1..0c01f68 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-02-01 Jakub Jelinek + + * lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse. + 2013-02-01 David Edelsohn * gcc.dg/pr56023.c: XFAIL on AIX. diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index b4d50cd..3a612a5 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -305,7 +305,9 @@ proc set-target-env-var { } { proc restore-target-env-var { } { upvar 1 saved_target_env_var saved_target_env_var - foreach env_var [lreverse $saved_target_env_var] { + for { set env_vari [llength $saved_target_env_var] } { + [incr env_vari -1] >= 0 } {} { + set env_var [lindex $saved_target_env_var $env_vari] set var [lindex $env_var 0] if [lindex $env_var 1] { setenv $var [lindex $env_var 2]