[LLVMbugs] [Bug 23472] New: missing comdats for static initializers in template and guard variables
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 11 01:15:30 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23472
Bug ID: 23472
Summary: missing comdats for static initializers in template
and guard variables
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: yaron.keren at gmail.com
CC: dschuff at google.com, geek4civic at gmail.com,
llvmbugs at cs.uiuc.edu, rnk at google.com
Classification: Unclassified
Created attachment 14307
--> https://llvm.org/bugs/attachment.cgi?id=14307&action=edit
header
compiling the attached sources on Windows x64 using
clang++ l1.cpp l2.cpp -target i686-pc-windows-gnu
results in
multiple definition of `guard variable for
lanczos_initializer<int>::initializer'
where as g++ is ok:
g++ l1.cpp l2.cpp
the object files shows comdats with g++ but not with clang:
>g++ l1.cpp -c & nm l1.o
00000000 b .bss
00000000 d .ctors
00000000 d .data
00000000 d .data$_ZGVN19lanczos_initializerIiE11initializerE
00000000 d .data$_ZN19lanczos_initializerIiE11initializerE
00000000 r .eh_frame
00000000 r .eh_frame$_ZN4initC1Ev
00000000 r .rdata$zzz
00000000 t .text
00000000 t .text$_ZN4initC1Ev
00000037 t __GLOBAL__sub_I__Z2l1v
00000000 T __Z2l1v
00000005 t __Z41__static_initialization_and_destruction_0ii
00000000 D __ZGVN19lanczos_initializerIiE11initializerE
00000000 D __ZN19lanczos_initializerIiE11initializerE
00000000 T __ZN4initC1Ev
>clang++ l1.cpp -c -target i686-pc-windows-gnu & nm l1.o
00000000 b .bss
00000000 b .bss
00000000 b .bss
00000000 d .ctors
00000000 d .data
00000000 d .eh_frame
00000000 t .text
00000000 t .text
00000000 t .text
00000001 a @feat.00
00000000 t ___cxx_global_var_init
00000000 T __Z2l1v
00000000 B __ZGVN19lanczos_initializerIiE11initializerE
00000000 B __ZN19lanczos_initializerIiE11initializerE
00000000 T __ZN4initC2Ev
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150511/5f4e1449/attachment.html>
More information about the llvm-bugs
mailing list