Compiling an application on IA-64, I got errors during linking about undefined
references to a label. This reference is produced by the compiler as part of a
switch statement but the label itself is not actually generated. Note that
this looks so much like PR27531 but the patch that fixed that problem on sparc
doesn't help on ia64. I hope though that previous investigation for PR27531
will help solve this problem. It certainly looks related, although I cannot
tell for sure.
[EMAIL PROTECTED]:~/bugs$ /usr/lib/gcc-snapshot/bin/gcc -O2 yasm-module.c
/usr/lib/crt1.o: In function `_start':
(.text+0x41): undefined reference to `main'
/tmp/ccOFSz00.o: In function `yasm_list_modules':
yasm-module.c:(.text+0x70): undefined reference to `.L11'
yasm-module.c:(.text+0x80): undefined reference to `.L11'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~/bugs$ /usr/lib/gcc-snapshot/bin/gcc -O1 yasm-module.c
/usr/lib/crt1.o: In function `_start':
(.text+0x41): undefined reference to `main'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~/bugs$ gcc-4.1 -O2 yasm-module.c
/usr/lib/gcc/ia64-linux-gnu/4.1.2/../../../crt1.o: In function `_start':
(.text+0x41): undefined reference to `main'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~/bugs$ gcc-4.0 -O2 yasm-module.c
/usr/lib/gcc/ia64-linux-gnu/4.0.4/../../../crt1.o: In function `_start':
(.text+0x41): undefined reference to `main'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~/bugs$
--
Summary: [4.2 regression] switch statement points to unreferenced
label at -O2
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
GCC build triplet: [EMAIL PROTECTED]
GCC host triplet: ia64-linux-gnu
GCC target triplet: ia64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28574