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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to