https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93384

--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, just small change is needed to make it reproduce the problem:
$ cat pr93384_0.c
void bar (void);
__attribute__((noipa)) void quux (int x) { if (x == 5) bar (); }
__attribute__((noipa, noreturn)) void foo (void) { while (1) ; }
__attribute__((noinline)) void bar (void) { asm (""); quux (7); foo (); }
void baz (int x) { if (x) bar (); }
$ cat pr93384_1.c
extern void bar (void);
void qux (int x) { if (!x) bar (); }
$ gcc -O2 -flto -ffat-lto-objects pr93384_0.c -c -fpic
-fno-semantic-interposition
$ gcc -O2 -flto -ffat-lto-objects pr93384_1.c -c -fpic
-fno-semantic-interposition
$ gcc -O2 -flto -shared -fpic -fno-semantic-interposition -o pr93384.so
pr93384_{0,1}.o -flto-partition=none
/tmp/ccbfJD5V.s: Assembler messages:
/tmp/ccbfJD5V.s:33: Error: redefined symbol cannot be used on reloc
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Reply via email to