public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
@ 2002-10-24 9:56 glen
0 siblings, 0 replies; 3+ messages in thread
From: glen @ 2002-10-24 9:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 8340
>Category: target
>Synopsis: [mainline regression] ICE on x86 inline asm w/ -fPIC
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Thu Oct 24 09:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Glen Nakamura
>Release: gcc version 3.3 20021023 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
asm.c: In function `foo':
asm.c:5: internal compiler error: asm clobber conflict with output operand
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
gcc -fPIC -c asm.c
>Fix:
(work-around) remove "static" from:
static int a;
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="asm.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="asm.c"
aW50CmZvbyAoKQp7CiAgc3RhdGljIGludCBhOwogIF9fYXNtX18gX192b2xhdGlsZV9fICgKICAg
ICJ4b3JsICUlZWJ4LCAlJWVieFxuIgogICAgIm1vdmwgJSVlYngsICUwXG4iCiAgICA6ICI9bSIg
KGEpCiAgICA6CiAgICA6ICIlZWJ4IgogICk7CiAgcmV0dXJuIGE7Cn0K
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
@ 2002-10-24 10:46 Glen Nakamura
0 siblings, 0 replies; 3+ messages in thread
From: Glen Nakamura @ 2002-10-24 10:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR target/8340; it has been noted by GNATS.
From: Glen Nakamura <glen@imodulo.com>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
Date: Thu, 24 Oct 2002 07:40:38 -1000
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC
@ 2002-10-25 16:01 rth
0 siblings, 0 replies; 3+ messages in thread
From: rth @ 2002-10-25 16:01 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, glen, nobody
Synopsis: [mainline regression] ICE on x86 inline asm w/ -fPIC
State-Changed-From-To: open->analyzed
State-Changed-By: rth
State-Changed-When: Fri Oct 25 16:01:14 2002
State-Changed-Why:
Yes, this code is illegal. This is common enough that we should
probably arrange for expand_asm_operands to complain if the
pic register is clobbered.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8340
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-25 23:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 9:56 target/8340: [mainline regression] ICE on x86 inline asm w/ -fPIC glen
2002-10-24 10:46 Glen Nakamura
2002-10-25 16:01 rth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).