[llvm-bugs] [Bug 51442] New: Regression since "Do not create LLVM IR `constant`s for objects with dynamic initialisation"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 11 09:13:58 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51442

            Bug ID: 51442
           Summary: Regression since "Do not create LLVM IR `constant`s
                    for objects with dynamic initialisation"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: martin at martin.st
                CC: hans at chromium.org, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org, momchil.velikov at arm.com,
                    neeilans at live.com, richard-llvm at metafoo.co.uk
            Blocks: 51236

Since 21aa107eb79f8ddc5e7ca4e8f3476338dfa90049,
https://reviews.llvm.org/D102693, 'Reland "Do not create LLVM IR `constant`s
for objects with dynamic initialisation"', the following C++ snippet fails to
compile:

$ cat fakeplugin2.cpp 
__attribute__ ((section (".qtmetadata"))) __attribute__((used)) void *const
pluginSection = (void*)(0xc0ffeec0ffeeL);
__attribute__ ((section (".qtmetadata"))) __attribute__((used)) const char
message[] = "QTMETADATA";

$ clang -target x86_64-linux-gnu -c fakeplugin2.cpp
fakeplugin2.cpp:2:76: error: 'message' causes a section type conflict with
'pluginSection'
__attribute__ ((section (".qtmetadata"))) __attribute__((used)) const char
message[] = "QTMETADATA";
                                                                           ^ 
fakeplugin2.cpp:1:77: note: declared here
__attribute__ ((section (".qtmetadata"))) __attribute__((used)) void *const
pluginSection = (void*)(0xc0ffeec0ffeeL);
                                                                            ^ 
1 error generated.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=51236
[Bug 51236] [meta] 13.0.0 Release Blockers
-- 
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/20210811/b279d62a/attachment.html>


More information about the llvm-bugs mailing list