gcc address-of-label extension broken

Bug #588314 reported by Jukka Lehtosalo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
llvm (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: llvm

When compiling C code that uses the gcc address-of-label extension using clang, the generated assembly is broken.

There is an upstream fix available for llvm:
http://llvm.org/bugs/show_bug.cgi?id=6608

I get the following error when compiling the example program in the above bug report:

$ cat test.c
int main(int argc, char**argv)
{
    const void *const jump_table[] = { &&lbl1, &&lbl2} ;
    goto *jump_table[0];
lbl1:
    return 1;
lbl2:
    return 0;
}
$ clang test.c
/tmp/cc-TYZ5AK.s: Assembler messages:
/tmp/cc-TYZ5AK.s:22: Error: symbol `.LBA4_main_' is already defined
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)

Ubuntu version: Ubuntu 10.04 LTS
llvm package version: 2.7-0ubuntu1

Revision history for this message
Anton Korobeynikov (anton-korobeynikov) wrote :

LLVM bug was fixed in the mainline. The fix will definitely go into LLVM 2.8

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.