This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix testsuite error when using profopt.exp
- From: Andreas Schwab <schwab at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Sep 2009 15:45:57 +0200
- Subject: Fix testsuite error when using profopt.exp
This patch fixes this testsuite error:
ERROR: src: can't read "flags2": no such variable for " dg-skip-if 2 "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } "
UNRESOLVED: /daten/aranym/gcc/gcc-20090923/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c: can't read "flags2": no such variable for " dg-skip-if 2 "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } "
Installed as obvious.
Andreas.
2009-09-23 Andreas Schwab <schwab@redhat.com>
* lib/profopt.exp (profopt-get-options): Set tool_flags for
current_compiler_flags. Fix typos.
Index: gcc/testsuite/lib/profopt.exp
===================================================================
--- gcc/testsuite/lib/profopt.exp (revision 152066)
+++ gcc/testsuite/lib/profopt.exp (working copy)
@@ -177,6 +177,10 @@
# dg-require-* sets dg-do-what.
upvar dg-do-what dg-do-what
+ # current_compiler_flags reads tool_flags from the same stack frame
+ # as dg-extra-tool-flags
+ set tool_flags ""
+
set tmp [dg-get-options $src]
foreach op $tmp {
set cmd [lindex $op 0]
@@ -188,13 +192,13 @@
|| [string match "dg-require-*" $cmd] } {
set status [catch "$op" errmsg]
if { $status != 0 } {
- perror "src: $errmsg for \"$op\"\n"
+ perror "$src: $errmsg for \"$op\"\n"
unresolved "$src: $errmsg for \"$op\""
return
}
} else {
# Ignore unrecognized dg- commands, but warn about them.
- warning "compat.exp does not support $cmd"
+ warning "profopt.exp does not support $cmd"
}
}
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."