This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
- From: Glen Nakamura <glen at imodulo dot com>
- To: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Date: Thu, 24 Oct 2002 07:40:38 -1000
- Subject: Re: target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8340
On second thought, maybe this really is invalid code when compiled w/ -fPIC?
gcc-3.2.1 silently generates the following incorrect code:
00000000 <foo>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: e8 00 00 00 00 call 9 <foo+0x9>
9: 5b pop %ebx
a: 81 c3 03 00 00 00 add $0x3,%ebx
10: 31 db xor %ebx,%ebx
12: 89 9b 00 00 00 00 mov %ebx,0x0(%ebx)
18: 8b 83 00 00 00 00 mov 0x0(%ebx),%eax
1e: 5b pop %ebx
1f: 5d pop %ebp
20: c3 ret
A better error message would be nice, especially for gcc-3.2.1,
but this isn't a high priority since the code seems invalid to me.
- glen