public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
2004-05-31 21:29 ` [Bug inline-asm/15740] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-05-31 21:29 ` pinskia at gcc dot gnu dot org
2004-07-14 15:18 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-30 23:42 -------
But that will not work, as then you have to do the lowering of the inout operands too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement
@ 2004-05-31 21:29 l_belev at yahoo dot com
2004-05-31 21:29 ` [Bug inline-asm/15740] [3.5 Regression] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: l_belev at yahoo dot com @ 2004-05-31 21:29 UTC (permalink / raw)
To: gcc-bugs
The following code compiled with -O (or greater) causes ICE:
void foo(void)
{
int a, b;
a = 1;
b = a + 1;
asm ("nop" : : "m" (a));
}
This is with the snapshot gcc-3.5-20040530.
--
Summary: ICE caused by a memory operand in an asm statement
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: l_belev at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux
GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
@ 2004-05-31 21:29 ` pinskia at gcc dot gnu dot org
2004-05-31 21:29 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-30 23:08 -------
Confirmed, the problem here is that a is being marked as addressable too late in the game. I think the
front-ends should be marking the variables as TREE_ADDRESSABLE just as they do for the output
constraints, I will work up a patch to do this unless some objects.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org, dnovillo at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-05-30 23:08:56
date| |
Summary|ICE caused by a memory |[3.5 Regression] ICE caused
|operand in an asm statement |by a memory operand in an
| |asm statement
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
2004-05-31 21:29 ` [Bug inline-asm/15740] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-05-31 21:29 ` pinskia at gcc dot gnu dot org
@ 2004-07-14 15:18 ` pinskia at gcc dot gnu dot org
2004-07-16 12:04 ` dnovillo at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-14 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-14 15:18 -------
*** Bug 16537 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |krebbel1 at de dot ibm dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (2 preceding siblings ...)
2004-07-14 15:18 ` pinskia at gcc dot gnu dot org
@ 2004-07-16 12:04 ` dnovillo at gcc dot gnu dot org
2004-07-20 19:08 ` dnovillo at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-07-16 12:04 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (3 preceding siblings ...)
2004-07-16 12:04 ` dnovillo at gcc dot gnu dot org
@ 2004-07-20 19:08 ` dnovillo at gcc dot gnu dot org
2004-07-20 19:21 ` rth at redhat dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-07-20 19:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-07-20 19:08 -------
ISTR fixing this in copy_if_shared_r. The idea is to piggyback marking the
variable as addressable together with the pre-gimple unsharing pass.
I think rth took it out when he fixed the vararg stuff. I see 3 options:
1- Add a call to mark_addressable in copy_if_shared_r.
2- Do another tree walk before gimplification.
3- As Andrew mentioned in comment #1, have the FEs mark the variables when they
find an __asm__.
I think I prefer (3). Richard? Jason? Any other ideas?
Diego.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org,
| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (4 preceding siblings ...)
2004-07-20 19:08 ` dnovillo at gcc dot gnu dot org
@ 2004-07-20 19:21 ` rth at redhat dot com
2004-09-13 9:28 ` rth at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rth at redhat dot com @ 2004-07-20 19:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at redhat dot com 2004-07-20 19:20 -------
Subject: Re: [3.5 Regression] ICE caused by a memory operand in an asm statement
On Tue, Jul 20, 2004 at 07:08:55PM -0000, dnovillo at gcc dot gnu dot org wrote:
> 3- As Andrew mentioned in comment #1, have the FEs mark the variables
> when they find an __asm__.
I prefer this.
r~
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [3.5 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (5 preceding siblings ...)
2004-07-20 19:21 ` rth at redhat dot com
@ 2004-09-13 9:28 ` rth at gcc dot gnu dot org
2004-12-28 17:09 ` [Bug inline-asm/15740] [4.0 " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-13 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-09-13 09:28 -------
You're not actually working on this are you? I'll take it.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|dnovillo at gcc dot gnu dot |rth at gcc dot gnu dot org
|org |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [4.0 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (6 preceding siblings ...)
2004-09-13 9:28 ` rth at gcc dot gnu dot org
@ 2004-12-28 17:09 ` pinskia at gcc dot gnu dot org
2004-12-28 17:09 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-28 17:08 -------
*** Bug 19178 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aj at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [4.0 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (7 preceding siblings ...)
2004-12-28 17:09 ` [Bug inline-asm/15740] [4.0 " pinskia at gcc dot gnu dot org
@ 2004-12-28 17:09 ` pinskia at gcc dot gnu dot org
2004-12-29 1:22 ` cvs-commit at gcc dot gnu dot org
2004-12-29 1:25 ` rth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-28 17:09 -------
*** Bug 19179 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [4.0 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (8 preceding siblings ...)
2004-12-28 17:09 ` pinskia at gcc dot gnu dot org
@ 2004-12-29 1:22 ` cvs-commit at gcc dot gnu dot org
2004-12-29 1:25 ` rth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-29 1:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-29 01:22 -------
Subject: Bug 15740
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rth@gcc.gnu.org 2004-12-29 01:22:16
Modified files:
gcc : ChangeLog c-typeck.c gimplify.c
gcc/cp : ChangeLog semantics.c
Added files:
gcc/testsuite/g++.dg/opt: asm2.C
gcc/testsuite/gcc.dg: asm-9.c
Log message:
PR inline-asm/15740
* gimplify.c (gimplify_asm_expr): Move resolve asm names ...
* c-typeck.c (build_asm_expr): ... here. Validate input
constraints. Mark memory inputs addressable.
* semantics.c (finish_asm_stmt): Resolve asm names. Validate input
constraints. Mark memory inputs addressable.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6974&r2=2.6975
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.405&r2=1.406
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.99&r2=2.100
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4561&r2=1.4562
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.454&r2=1.455
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/asm2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/asm-9.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug inline-asm/15740] [4.0 Regression] ICE caused by a memory operand in an asm statement
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
` (9 preceding siblings ...)
2004-12-29 1:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-29 1:25 ` rth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-12-29 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-12-29 01:25 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15740
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-12-29 1:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-31 21:29 [Bug inline-asm/15740] New: ICE caused by a memory operand in an asm statement l_belev at yahoo dot com
2004-05-31 21:29 ` [Bug inline-asm/15740] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-05-31 21:29 ` pinskia at gcc dot gnu dot org
2004-07-14 15:18 ` pinskia at gcc dot gnu dot org
2004-07-16 12:04 ` dnovillo at gcc dot gnu dot org
2004-07-20 19:08 ` dnovillo at gcc dot gnu dot org
2004-07-20 19:21 ` rth at redhat dot com
2004-09-13 9:28 ` rth at gcc dot gnu dot org
2004-12-28 17:09 ` [Bug inline-asm/15740] [4.0 " pinskia at gcc dot gnu dot org
2004-12-28 17:09 ` pinskia at gcc dot gnu dot org
2004-12-29 1:22 ` cvs-commit at gcc dot gnu dot org
2004-12-29 1:25 ` rth at gcc dot gnu dot org
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).