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

           Summary: llvm-gcc generates bad assembly: invalid sections for
                    operation on ...
           Product: tools
           Version: 2.8
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-gcc
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=5629)
 --> (http://llvm.org/bugs/attachment.cgi?id=5629)
Small C source code to demonstrate the problem.

llvm-gcc seems to generate bad assembly for jump-table offsets.

This could be related to bug2023.


Snippet from the attached source file:

#define LABEL_DIFF(t,a,b) ((t) ((const char*)&&a - (const char*)&&b))

int *test_short(int i)
{
    static const short t[] = { 0, LABEL_DIFF(short,l1,l0) };
    goto * (const void *) ((const char *)&&l0 + t[i]);
    l0: return &a;
    l1: return &b;
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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