This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: testsuite] clean up convoluted dg-final directive in vect-multitypes-12.c
- From: Andreas Schwab <schwab at suse dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: janisjo at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Jan 2013 10:16:21 +0100
- Subject: Re: testsuite] clean up convoluted dg-final directive in vect-multitypes-12.c
- References: <50F980CE.6030609@mentor.com> <2987551.qUaChJ0c29@polaris>
Eric Botcazou <ebotcazou@adacore.com> writes:
> ERROR: gcc.dg/vect/vect-multitypes-12.c: error executing dg-final: bad index
> "18-1": must be integer or end?-integer?
Does that help? Perhaps the M-N feature isn't supported by your version
of tcl.
* lib/target-supports-dg.exp (dg-process-target): Use expr to
evaluate the end index in string range.
diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index fffd8bb..1b56536 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -586,7 +586,7 @@ if { [info procs saved-dg-process-target] == [list] } {
if [regexp "^target .* xfail .*" $selector] {
set xfail_index [string first "xfail" $selector]
set xfail_selector [string range $selector $xfail_index end]
- set target_selector [string range $selector 0 $xfail_index-1]
+ set target_selector [string range $selector 0 [expr $xfail_index-1]]
set target_selector [string trim $target_selector]
if { [dg-process-target-1 $target_selector] == "N" } {
return "N"
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."