This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/15717] New: Error: can't resolve `L0' {*ABS* section} - `xx' {*UND* section}
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2004 21:02:24 -0000
- Subject: [Bug rtl-optimization/15717] New: Error: can't resolve `L0' {*ABS* section} - `xx' {*UND* section}
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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