Code compiling in gcc but not llvm

Hi,

This is my first post, sorry if not in the right format.

I am stuck at a place where I have a code fragment that runs in normal gcc but fails when I give -fplugin=dragonegg.so

extern int *testfunc();

extern __typeof (testfunc) testfunc asm (“” “__GI_testfunc”) attribute ((visibility (“hidden”)));

extern __typeof(testfunc) __testfunc;

extern __typeof (__testfunc) __testfunc asm (“” “__GI___testfunc”) attribute ((visibility (“hidden”)));

int *__testfunc()
{
return 0;
}

extern __typeof (__testfunc) __EI___testfunc asm(“” “__testfunc”);

extern __typeof (__testfunc) __EI___testfunc attribute((alias (“” “__GI___testfunc”)));
extern __typeof(__testfunc) testfunc attribute ((weak, alias (“__testfunc”)));

$ gcc -S test.c

$ cat test.s

.file “test.c”
.text
.globl __GI___testfunc
.hidden __GI___testfunc
.type __GI___testfunc, @function
__GI___testfunc:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movl $0, %eax
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size __GI___testfunc, .-__GI___testfunc
.globl __testfunc
.set __testfunc,__GI___testfunc
.weak __GI_testfunc
.hidden __GI_testfunc
.set __GI_testfunc,__testfunc
.ident “GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3”
.section .note.GNU-stack,“”,@progbits

$ gcc -S test.c -fplugin=dragonegg.so

test.c:17:29: error: ‘*__GI_testfunc’ aliased to undefined symbol ‘__testfunc’

I am trying to compile this file using llvm as backend (dragonegg)

Hi,

Hi,

This is my first post, sorry if not in the right format.

I am stuck at a place where I have a code fragment that runs in normal gcc but
fails when I give -fplugin=dragonegg.so

please open a bug report in bugzilla (Bugzilla Main Page).

Ciao, Duncan.