This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH to testsuite/lib/scanasm.exp


Using expr seems cleaner.

2001-08-13  Jason Merrill  <jason_merrill@redhat.com>

	* lib/scanasm.exp (scan-assembler*): Use expr instead of concat.

*** ./lib/scanasm.exp.~1~	Mon Aug 13 15:54:45 2001
--- ./lib/scanasm.exp	Sat Jul 28 11:57:28 2001
*************** proc scan-assembler { pattern args } {
*** 23,29 ****
      # 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 { concat "$name" }]
  
      # This must match the rule in gcc-dg.exp.
      set output_file "[file rootname [file tail $testcase]].s"
--- 23,29 ----
      # 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 } }]
  
      # This must match the rule in gcc-dg.exp.
      set output_file "[file rootname [file tail $testcase]].s"
*************** proc scan-assembler { pattern args } {
*** 46,52 ****
  
  # Call pass if pattern is not present, otherwise fail.
  proc scan-assembler-not { pattern args } {
!     set testcase [uplevel 2 { concat "$name" }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open $output_file r]
--- 46,52 ----
  
  # Call pass if pattern is not present, otherwise fail.
  proc scan-assembler-not { pattern args } {
!     set testcase [uplevel 2 { expr { $name } }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open $output_file r]
*************** proc scan-assembler-dem { pattern args }
*** 79,85 ****
  	verbose -log "c++filt is $cxxfilt"
      }
  
!     set testcase [uplevel 2 { concat "$name" }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open "| $cxxfilt < $output_file" r]
--- 79,85 ----
  	verbose -log "c++filt is $cxxfilt"
      }
  
!     set testcase [uplevel 2 { expr { $name } }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open "| $cxxfilt < $output_file" r]
*************** proc scan-assembler-dem-not { pattern ar
*** 111,117 ****
  	verbose -log "c++filt is $cxxfilt"
      }
  
!     set testcase [uplevel 2 { concat "$name" }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open "| $cxxfilt < $output_file" r]
--- 111,117 ----
  	verbose -log "c++filt is $cxxfilt"
      }
  
!     set testcase [uplevel 2 { expr { $name } }]
      set output_file "[file rootname [file tail $testcase]].s"
  
      set fd [open "| $cxxfilt < $output_file" r]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]