public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm
@ 2009-02-01 10:58 reichelt at gcc dot gnu dot org
2009-02-01 11:03 ` [Bug inline-asm/39058] " reichelt at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-02-01 10:58 UTC (permalink / raw)
To: gcc-bugs
The following (IMHO valid) code snippet triggers an ICE since GCC 4.3.0
when compiled with "-O":
========================================
double foo()
{
double x;
asm("" : "=r,r"(x) : "0,0"(x));
return x;
}
========================================
bug.c: In function 'foo':
bug.c:5: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1393
Please submit a full bug report, [etc.]
The same code compiles fine if I use float instead of double.
--
Summary: [4.3/4.4 regression] ICE with double in inline-asm
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3/4.4 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
@ 2009-02-01 11:03 ` reichelt at gcc dot gnu dot org
2009-02-02 10:07 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-02-01 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from reichelt at gcc dot gnu dot org 2009-02-01 11:03 -------
A slightly more complex testcase crashes in a different place:
============================================================
double foo()
{
double x, y;
asm("" : "=r,r"(x), "=r,r"(y) : "%0,0"(x), "r,r"(0));
return x;
}
============================================================
bug.c: In function 'foo':
bug.c:6: error: Failure trying to reload:
(nil)
bug.c:6: internal compiler error: in gen_reload, at reload1.c:8327
Please submit a full bug report, [etc.]
Again, no ICE without optimization or with float instead of double.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3/4.4 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
2009-02-01 11:03 ` [Bug inline-asm/39058] " reichelt at gcc dot gnu dot org
@ 2009-02-02 10:07 ` jakub at gcc dot gnu dot org
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3 " jakub at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02 10:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2009-02-02 10:06 -------
I think the bug is in check_asm_operands/asm_operand_ok.
The latter has:
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
/* For best results, our caller should have given us the
proper matching constraint, but we can't actually fail
the check if they didn't. Indicate that results are
inconclusive. */
but the former only handles the simple case:
if (c[0] == '%')
c++;
if (ISDIGIT ((unsigned char) c[0]) && c[1] == '\0')
c = constraints[c[0] - '0'];
Together this allows combine to combine something that definitely shouldn't be
combined.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-02-02 10:06:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
2009-02-01 11:03 ` [Bug inline-asm/39058] " reichelt at gcc dot gnu dot org
2009-02-02 10:07 ` jakub at gcc dot gnu dot org
@ 2009-02-02 13:24 ` jakub at gcc dot gnu dot org
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3/4.4 " jakub at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02 13:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-02-02 13:24 -------
Fixed on the trunk so far.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4 regression] ICE |[4.3 regression] ICE with
|with double in inline-asm |double in inline-asm
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3/4.4 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3 " jakub at gcc dot gnu dot org
@ 2009-02-02 13:24 ` jakub at gcc dot gnu dot org
2009-02-16 8:46 ` [Bug inline-asm/39058] [4.3 " ubizjak at gmail dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02 13:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-02-02 13:23 -------
Subject: Bug 39058
Author: jakub
Date: Mon Feb 2 13:23:43 2009
New Revision: 143867
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143867
Log:
PR inline-asm/39058
* recog.h (asm_operand_ok): Add constraints argument.
* recog.c (asm_operand_ok): Likewise. If it is set, for digits
recurse on matching constraint.
(check_asm_operands): Pass constraints as 3rd argument to
asm_operand_ok. Don't look up matching constraint here.
* stmt.c (expand_asm_operands): Pass NULL as 3rd argument
to asm_operand_ok.
* gcc.target/i386/pr39058.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr39058.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/recog.c
trunk/gcc/recog.h
trunk/gcc/stmt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3/4.4 " jakub at gcc dot gnu dot org
@ 2009-02-16 8:46 ` ubizjak at gmail dot com
2009-02-21 13:17 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-02-16 8:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ubizjak at gmail dot com 2009-02-16 08:45 -------
*** Bug 39199 has been marked as a duplicate of this bug. ***
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mike at ducky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-02-16 8:46 ` [Bug inline-asm/39058] [4.3 " ubizjak at gmail dot com
@ 2009-02-21 13:17 ` rguenth at gcc dot gnu dot org
2009-02-26 7:07 ` uros at gcc dot gnu dot org
2009-02-26 7:23 ` ubizjak at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-21 13:17 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.3.0
Known to work| |4.2.4 4.4.0
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-02-21 13:17 ` rguenth at gcc dot gnu dot org
@ 2009-02-26 7:07 ` uros at gcc dot gnu dot org
2009-02-26 7:23 ` ubizjak at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: uros at gcc dot gnu dot org @ 2009-02-26 7:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from uros at gcc dot gnu dot org 2009-02-26 07:07 -------
Subject: Bug 39058
Author: uros
Date: Thu Feb 26 07:06:48 2009
New Revision: 144445
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144445
Log:
Backport from mainline:
2009-02-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/39058
* recog.h (asm_operand_ok): Add constraints argument.
* recog.c (asm_operand_ok): Likewise. If it is set, for digits
recurse on matching constraint.
(check_asm_operands): Pass constraints as 3rd argument to
asm_operand_ok. Don't look up matching constraint here.
* stmt.c (expand_asm_operands): Pass NULL as 3rd argument
to asm_operand_ok.
testsuite/ChangeLog:
Backport from mainline:
2009-02-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/39058
* gcc.target/i386/pr39058.c: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr39058.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/recog.c
branches/gcc-4_3-branch/gcc/recog.h
branches/gcc-4_3-branch/gcc/stmt.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug inline-asm/39058] [4.3 regression] ICE with double in inline-asm
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-02-26 7:07 ` uros at gcc dot gnu dot org
@ 2009-02-26 7:23 ` ubizjak at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-02-26 7:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ubizjak at gmail dot com 2009-02-26 07:23 -------
Fixed.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39058
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-02-26 7:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-01 10:58 [Bug inline-asm/39058] New: [4.3/4.4 regression] ICE with double in inline-asm reichelt at gcc dot gnu dot org
2009-02-01 11:03 ` [Bug inline-asm/39058] " reichelt at gcc dot gnu dot org
2009-02-02 10:07 ` jakub at gcc dot gnu dot org
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3 " jakub at gcc dot gnu dot org
2009-02-02 13:24 ` [Bug inline-asm/39058] [4.3/4.4 " jakub at gcc dot gnu dot org
2009-02-16 8:46 ` [Bug inline-asm/39058] [4.3 " ubizjak at gmail dot com
2009-02-21 13:17 ` rguenth at gcc dot gnu dot org
2009-02-26 7:07 ` uros at gcc dot gnu dot org
2009-02-26 7:23 ` ubizjak at gmail dot com
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).