[LLVMbugs] [Bug 8192] New: Clang differs from GCC in when it exports the typeinfo name, causing link errors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 20 09:40:16 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8192

           Summary: Clang differs from GCC in when it exports the typeinfo
                    name, causing link errors
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tor.arne.vestbo at nokia.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


It seems Clang differs from GCC in how and when it exports the typeinfo name,
which causes link errors due to duplicate symbols. The following testcase
exhibits the issue:

http://gist.github.com/588176

When built with GCC the foo and bar object files contains the following type
info:

00000000000000e0 s typeinfo for (anonymous namespace)::LocalToTranslationUnit
00000000000000f8 s typeinfo name for (anonymous
namespace)::LocalToTranslationUnit

But for Clang we get:

00000000000001a0 s typeinfo for (anonymous namespace)::LocalToTranslationUnit
00000000000001c0 S typeinfo name for (anonymous
namespace)::LocalToTranslationUnit

The exported typeinfo name causes a duplicate symbol error when linking.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list