This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch]: testsuite "RESOLVE" g++ `check_alias_available' on solaris2
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Feb 2004 10:09:50 -0500 (EST)
- Subject: [patch]: testsuite "RESOLVE" g++ `check_alias_available' on solaris2
As noted here:
http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00968.html
the g++.dg/ext/attrib10.C and g++.old-deja/g++.ext/attrib5.C tests are
marked UNRESOLVED on solaris2.
This is because the testsuite harness function check_alias_available
fails under g++ but it succeeds for gcc. As noted in the comments
above my tweek below, solaris2 requires a definition of `g' for the
native assembler to be happy. In C++, `g' gets mangled so the
assembler doesn't see it. Fixed with the patch below.
Tested via "make check" on sparc-sun-solaris2.7.
Ok for mainline and 3.4?
Thanks,
--Kaveh
2004-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lib/target-supports.exp (check_alias_available): Don't mangle
function `g' in test program.
diff -rup orig/egcc-CVS20040219/gcc/testsuite/lib/target-supports.exp egcc-CVS20040219/gcc/testsuite/lib/target-supports.exp
--- orig/egcc-CVS20040219/gcc/testsuite/lib/target-supports.exp 2004-02-05 20:03:55.000000000 -0500
+++ egcc-CVS20040219/gcc/testsuite/lib/target-supports.exp 2004-02-20 09:16:23.545057728 -0500
@@ -109,6 +109,7 @@ proc check_alias_available { } {
# Compile a small test program. The definition of "g" is
# necessary to keep the Solaris assembler from complaining
# about the program.
+ puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif\n"
puts $f "void g() {} void f() __attribute__((alias(\"g\")));"
close $f
set lines [${tool}_target_compile "tmp.c" "tmp.o" object ""]