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]
Other format: [Raw text]

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."


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