[LLVMbugs] [Bug 23732] New: C++ global initializers are "optimized" away when used with section attribute
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 2 07:21:49 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23732
Bug ID: 23732
Summary: C++ global initializers are "optimized" away when used
with section attribute
Product: clang
Version: 3.6
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: npl at chello.at
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14421
--> https://llvm.org/bugs/attachment.cgi?id=14421&action=edit
Code showing the issue
Hello,
Having a static instance of a class with an initializer usually will create a
function (in __init_array) so that the constructor is called early.
Using the section attribute will result in the function being omitted and the
programm ill-formed.
--
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/20150602/e57c1b7a/attachment.html>
More information about the llvm-bugs
mailing list