https://llvm.org/bugs/show_bug.cgi?id=31625
Bug ID: 31625 Summary: -fno-zero-initialized-in-bss -fno-common and tentative definitions Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: hst...@ca.ibm.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Clang's support for -fno-zero-initialized-in-bss does not match GCC's. In particular, when using -fno-common, tentative definitions are still placed by GCC into BSS. Online compiler: http://melpon.org/wandbox/permlink/76ugV7cPaxxqjIMl ### Source (<stdin>): int x; ### Compiler invocation: clang -c -o a.o -x c -fno-common -fno-zero-initialized-in-bss - ### Additional commands: objdump -wt a.o | grep -P '\b''x\b' ### Expected output: 0000000000000000 g O .bss 0000000000000004 x ### Actual output: 0000000000000000 g O .data 0000000000000004 x ### clang -v: clang version 4.0.0 (trunk 290110) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/llvm-head/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs