[Bug rtl-optimization/15717] New: Error: can't resolve `L0' {*ABS* section} - `xx' {*UND* section}
rakdver at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat May 29 14:49:00 GMT 2004
The following testcase
struct x
{
int a[100];
int b[100];
};
extern struct x xx;
void xxx(void)
{
unsigned long a = (unsigned long) &xx.b[0];
printf ("%ld", -a);
}
Fails to compile with
/xgcc -B. -O1 -c yyy.c
/tmp/ccBFXfe3.s: Assembler messages:
/tmp/ccBFXfe3.s:13: Error: can't resolve `L0' {*ABS* section} - `xx' {*UND* section}
The problem is that cse produces the following rtl:
(const:SI (minus:SI (const_int -400 [0xfffffe70])
(symbol_ref:SI ("xx") [flags 0x40] <var_decl 0x402ec000 xx>)))
Which translates to assembler like
movl $-400-xx, 4(%esp)
Which as does not like.
--
Summary: Error: can't resolve `L0' {*ABS* section} - `xx' {*UND*
section}
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rakdver at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15717
More information about the Gcc-bugs
mailing list