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]

Re: [Bug other/6480] C testsuite '--tool_opts' has incorrect precedence


This is an update to the patch I submitted for a bug in April 2002.

To recap:

When invesigating the difference between testsuite runs with and without RUNFLAGS="--tool_opts='-march=pentium3 -mfpmath=sse'", it turned out that all the failures were either due to poorly constructed testcases or from a bug in C testing framework.

The latter occurs because gcc.exp and objc.exp, unlike g77.exp and g++.exp, append tool_opts *after* the testcase-specific options. Some tests may require those particular --tool_opt options to be overriden.

Certainly, all the test frameworks should be operate on the same assumption.

After this patch, there are no new regressions without specifying a RUNFLAGS=... option

Numerous regressions are "fixed" by this patch when the testsuite is run with make -k RUNFLAGS="--tool_opts='-march=pentium3 -mfpmath=sse'" check-gcc

for example: gcc.misc-tests/i386-pf-none-1.c

If approved, then I would need this patch applied as I do not have CVSwrite access.

Kelley Cook

2003-05-30  Kelley Cook  <kelleycook@wideopenwest.com>

	* lib/gcc.exp: Allow command line options to be overridden.
	* lib/objc.exp: Likewise.

--- testsuite/lib/gcc.exp.orig	2002-09-26 05:51:45.000000000 -0400
+++ testsuite/lib/gcc.exp	2003-05-30 13:53:20.000000000 -0400
@@ -147,7 +147,7 @@ proc gcc_target_compile { source dest ty
 	lappend options "additional_flags=-DNO_LABEL_VALUES"
     }
     if [info exists TOOL_OPTIONS] {
-	lappend options "additional_flags=$TOOL_OPTIONS"
+	set options [concat "additional_flags=$TOOL_OPTIONS" $options];
     }
     if [target_info exists gcc,timeout] {
 	lappend options "timeout=[target_info gcc,timeout]"
--- testsuite/lib/objc.exp.orig	2003-05-30 13:49:18.000000000 -0400
+++ testsuite/lib/objc.exp	2003-05-30 13:52:46.000000000 -0400
@@ -163,7 +163,7 @@ proc objc_target_compile { source dest t
 	lappend options "additional_flags=-DNO_LABEL_VALUES"
     }
     if [info exists TOOL_OPTIONS] {
-	lappend options "additional_flags=$TOOL_OPTIONS"
+	set options [concat "additional_flags=$TOOL_OPTIONS" $options];
     }
 
     # Point to the ObjC headers in libobjc.

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