[LLVMbugs] [Bug 18105] New: A label with inline assembly inside a loop might be duplicated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 1 05:30:17 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=18105

            Bug ID: 18105
           Summary: A label with inline assembly inside a loop might be
                    duplicated
           Product: libraries
           Version: 3.3
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: alon.batz at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

try to compile the following code with -O2 (or -O3):

#include "stdio.h"
int main() {
        for (int i=0; i<3; i++)
                asm("x:addl %eax, 0");   
        return 0;
}

the optimizer duplicates the inline assembly - duplicates the label and so
results in:
error: invalid symbol redefinition

I assume this bug will reproduce in some other optimizations such as function
inlining.

-- 
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/20131201/00a4e5bf/attachment.html>


More information about the llvm-bugs mailing list