Error in checking compat.exp

Bernd Jendrissek berndj@prism.co.za
Wed Mar 14 09:57:00 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

On Tue, Mar 13, 2007 at 02:22:06PM -0700, Jim Wilson wrote:
> Revital1 Eres wrote:
> >ERROR: tcl error sourcing
> >/home/eres/mve_mainline_zero_12_3/gcc/gcc/testsuite/g++.dg/compat/compat.exp.
> >ERROR: couldn't open
> >"/home/eres/mve_xline_zero_12_3/gcc/gcc/testsuite/g++.dg/compat/abi/bitfield1_main.C":
> 
> Note that mainline got changed to xline.  Also note that the directory 
> has files bitfield_main.C, bitfield_x.C, and bitfield_y.C.
> 
> So it looks like there is a tcl script somewhere to replace "main" with 
> "x", which fails if the directory path contains "main" anywhere in it 
> other than in the filename at the end.

Would this do it in compat.exp: compat-execute?
    regsub "_main" $src1 "_x" src2

Does this fix your problem?

diff -up gcc/gcc/testsuite/lib/compat.exp.borig gcc/gcc/testsuite/lib/compat.exp
--- gcc/gcc/testsuite/lib/compat.exp.borig      2005-07-15 17:43:56.000000000 +0200
+++ gcc/gcc/testsuite/lib/compat.exp    2007-03-14 11:54:48.000000000 +0200
@@ -260,8 +260,8 @@ proc compat-execute { src1 sid use_alt }
     # Set up the names of the other source files.
     regsub "_main.*" $src1 "" base
     regsub ".*/" $base "" base
-    regsub "_main" $src1 "_x" src2
-    regsub "_main" $src1 "_y" src3
+    regsub "_main(\[^/\]*)$" $src1 "_x\\1" src2
+    regsub "_main(\[^/\]*)$" $src1 "_y\\1" src3
 
     # Use the dg-options mechanism to specify extra flags for this test. 
     # The extra flags in each file are used to compile that file, and the
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF98bRwyMv24BBd/gRAgfwAKCRWDBedJY/CBZ+W49w9ZOodkVCNwCgkhGS
D2a0mw7qMVEmiGuI4bdJpBc=
=pIoP
-----END PGP SIGNATURE-----



More information about the Gcc mailing list