From bfd811a412d037dc3a8eba3e74e6375e02d5e805 Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 16 May 2002 05:10:10 +0000
Subject: [PATCH]         * lib/scanasm.exp (scan-assembler): Use upvar, not
 uplevel.         (scan-assembler-not, scan-assembler-dem): Likewise.        
 (scan-assembler-dem-not): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53508 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog       | 6 ++++++
 gcc/testsuite/lib/scanasm.exp | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e2b5ff06f469..2e9b9f975e53 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-16  Jason Merrill  <jason@redhat.com>
+
+	* lib/scanasm.exp (scan-assembler): Use upvar, not uplevel.
+	(scan-assembler-not, scan-assembler-dem): Likewise.
+	(scan-assembler-dem-not): Likewise.
+
 2002-05-15  Richard Henderson  <rth@redhat.com>
 
 	* gcc.dg/weak-5.c (vfoo1c, vfoo1g): Warn here.
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 9f6d7dabca59..637b298ee42d 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -40,7 +40,7 @@ proc scan-assembler { args } {
     # This assumes that we are two frames down from dg-test, and that
     # it still stores the filename of the testcase in a local variable "name".
     # A cleaner solution would require a new dejagnu release.
-    set testcase [uplevel 2 { expr { $name } }]
+    upvar 2 name testcase
 
     # This must match the rule in gcc-dg.exp.
     set output_file "[file rootname [file tail $testcase]].s"
@@ -75,7 +75,7 @@ proc scan-assembler-not { args } {
 	}
     }
 
-    set testcase [uplevel 2 { expr { $name } }]
+    upvar 2 name testcase
     set output_file "[file rootname [file tail $testcase]].s"
 
     set fd [open $output_file r]
@@ -120,7 +120,7 @@ proc scan-assembler-dem { args } {
 	verbose -log "c++filt is $cxxfilt"
     }
 
-    set testcase [uplevel 2 { expr { $name } }]
+    upvar 2 name testcase
     set output_file "[file rootname [file tail $testcase]].s"
 
     set fd [open "| $cxxfilt < $output_file" r]
@@ -172,7 +172,7 @@ proc scan-assembler-dem-not { args } {
 	verbose -log "c++filt is $cxxfilt"
     }
 
-    set testcase [uplevel 2 { expr { $name } }]
+    upvar 2 name testcase
     set output_file "[file rootname [file tail $testcase]].s"
 
     set fd [open "| $cxxfilt < $output_file" r]
-- 
GitLab