gcc address-of-label extension broken
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://
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-
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
LLVM bug was fixed in the mainline. The fix will definitely go into LLVM 2.8