[Bug c++/41856] g++.dg/lookup/extern-c-redecl[3,4] .C scan-assembler fails on darwin

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Wed Oct 28 21:41:00 GMT 2009



------- Comment #4 from dominiq at lps dot ens dot fr  2009-10-28 21:41 -------
On i686-apple-darwin9, with the patch I get:

Running target unix
Using /sw/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /sw/share/dejagnu/config/unix.exp as generic interface file for target.
Using /opt/gcc/gcc-4.5-work/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /opt/gcc/gcc-4.5-work/gcc/testsuite/g++.dg/dg.exp ...
FAIL: g++.dg/lookup/extern-c-redecl4.C scan-assembler call[\t ]+_?_Z4forkv

                === g++ Summary for unix ===

# of expected passes            11
# of unexpected failures        1
Running target unix/-m64
Using /sw/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /sw/share/dejagnu/config/unix.exp as generic interface file for target.
Using /opt/gcc/gcc-4.5-work/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /opt/gcc/gcc-4.5-work/gcc/testsuite/g++.dg/dg.exp ...

                === g++ Summary for unix/-m64 ===

# of expected passes            12

                === g++ Summary ===

# of expected passes            23
# of unexpected failures        1
/Volumes/MacBook/opt/gcc/i686-darwin/gcc/testsuite/g++/../../g++  version 4.5.0
20091028 (experimental) [trunk revision 153644p3d] (GCC) 

grepping the assembly file for ++.dg/lookup/extern-c-redecl4.C compiled with
-m32, I see

        call    L__Z4forkv$stub
        call    LPC$1

The failure disappears with the following patch:

--- ../_gcc_clean/gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C       
2009-10-26 17:19:09.000000000 +0100
+++ gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C      2009-10-28
22:39:48.000000000 +0100
@@ -2,9 +2,9 @@
 // Origin: PR c++/41020

 // Avoid the "-ansi -pedantic" option
-// { dg-options "" }
+// { dg-options "-O0" }
 // { dg-do compile }
-// { dg-final { scan-assembler "call\[\t \]+_Z4forkv" } }
+// { dg-final { scan-assembler "call\[\t \]+L?_?_Z4forkv" { target i?86-*-*
x86_64-*-* } } }

 class frok
 {


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41856



More information about the Gcc-bugs mailing list