public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression
@ 2005-05-07 8:27 dank at kegel dot com
2005-05-07 8:31 ` [Bug c++/21440] " dank at kegel dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: dank at kegel dot com @ 2005-05-07 8:27 UTC (permalink / raw)
To: gcc-bugs
The following test program works with gcc-2.95.3 and gcc-3.4.1,
but aborts with this error on gcc-4.0.0:
z.ii: In function 'void bar()':
z.ii:11: internal compiler error: in create_tmp_var, at gimplify.c:368
struct Foo {
~Foo() {}
int i;
operator bool() { return !i; }
};
void bar() {
Foo foo = ({
Foo bletch;
bletch.i = 0;
bletch;
});
}
This popped up in an early run of gcc-4.0.0 on real code.
--
Summary: [4.0 Regression] ICE with statement-as-expression
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dank at kegel dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
@ 2005-05-07 8:31 ` dank at kegel dot com
2005-05-07 15:02 ` [Bug c++/21440] [4.0/4.1 " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dank at kegel dot com @ 2005-05-07 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dank at kegel dot com 2005-05-07 08:31 -------
Forgot to mention: I have applied the fixes for
PR20973 and PR21173 as given in bugzilla.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0 Regression] ICE with |[4.0 Regression] ICE with
|statement-as-expression |statement-as-expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
2005-05-07 8:31 ` [Bug c++/21440] " dank at kegel dot com
@ 2005-05-07 15:02 ` pinskia at gcc dot gnu dot org
2005-05-09 20:44 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-07 15:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-07 15:02 -------
Confirmed. Related to PR 20103.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |20103
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-05-07 15:02:24
date| |
Summary|[4.0 Regression] ICE with |[4.0/4.1 Regression] ICE
|statement-as-expression |with statement-as-expression
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
2005-05-07 8:31 ` [Bug c++/21440] " dank at kegel dot com
2005-05-07 15:02 ` [Bug c++/21440] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-05-09 20:44 ` pinskia at gcc dot gnu dot org
2005-06-02 10:01 ` nathan at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-09 20:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-09 20:43 -------
This has been failing since the tree-ssa branch was merged in and on the tree-ssa since at least
2003-05-30.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (2 preceding siblings ...)
2005-05-09 20:44 ` pinskia at gcc dot gnu dot org
@ 2005-06-02 10:01 ` nathan at gcc dot gnu dot org
2005-06-02 11:41 ` nathan at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-06-02 10:01 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-05-07 15:02:24 |2005-06-02 10:01:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (3 preceding siblings ...)
2005-06-02 10:01 ` nathan at gcc dot gnu dot org
@ 2005-06-02 11:41 ` nathan at gcc dot gnu dot org
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-06-02 11:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nathan at gcc dot gnu dot org 2005-06-02 11:41 -------
ug, this is horrible. we're incorrectly smashing up the inside of a STMT_EXPR
to pull out a TARGET_EXPR we know is there. Unfortunately that moves a decl
outside of its cleanup. We really should be going the other way and pushing the
user of the STMT_EXPR into it. I suspect we'll need to move further along the
path of making STMT_EXPRs look like real function calls, complete with an
explicitly generated RESULT_DECL.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nathan at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (4 preceding siblings ...)
2005-06-02 11:41 ` nathan at gcc dot gnu dot org
@ 2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-07-25 12:21 ` reichelt at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-06 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-07-06 17:02 -------
Postponed until 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (5 preceding siblings ...)
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
@ 2005-07-25 12:21 ` reichelt at gcc dot gnu dot org
2005-09-03 21:32 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-07-25 12:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-25 11:57 -------
Shorter testcase:
===========================
struct A
{
~A();
};
void foo()
{
A a = ({ A b; b; });
}
===========================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (6 preceding siblings ...)
2005-07-25 12:21 ` reichelt at gcc dot gnu dot org
@ 2005-09-03 21:32 ` mmitchel at gcc dot gnu dot org
2005-09-05 15:59 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-03 21:32 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (7 preceding siblings ...)
2005-09-03 21:32 ` mmitchel at gcc dot gnu dot org
@ 2005-09-05 15:59 ` cvs-commit at gcc dot gnu dot org
2005-09-05 16:01 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-05 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-05 15:59 -------
Subject: Bug 21440
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-09-05 15:59:32
Modified files:
gcc/cp : semantics.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: stmtexpr5.C stmtexpr6.C
Log message:
PR c++/21440
* semantics.c (finish_stmt_expr_expr): Add an explicit
initialization to the last statement in the statement-expression.
* (finish_stmt_expr): Adjust accordingly.
PR c++/21440
* g++.dg/ext/stmtexpr5.C: New test.
* g++.dg/ext/stmtexpr6.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.484&r2=1.485
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4869&r2=1.4870
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6009&r2=1.6010
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (8 preceding siblings ...)
2005-09-05 15:59 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-05 16:01 ` cvs-commit at gcc dot gnu dot org
2005-09-05 16:08 ` mmitchel at gcc dot gnu dot org
2005-09-06 15:15 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-05 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-05 16:00 -------
Subject: Bug 21440
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: mmitchel@gcc.gnu.org 2005-09-05 16:00:46
Modified files:
gcc/cp : semantics.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: stmtexpr5.C stmtexpr6.C
Log message:
PR c++/21440
* semantics.c (finish_stmt_expr_expr): Add an explicit
initialization to the last statement in the statement-expression.
* (finish_stmt_expr): Adjust accordingly.
PR c++/21440
* g++.dg/ext/stmtexpr5.C: New test.
* g++.dg/ext/stmtexpr6.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.463.2.7&r2=1.463.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.89&r2=1.4648.2.90
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.376&r2=1.5084.2.377
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr5.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr6.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (9 preceding siblings ...)
2005-09-05 16:01 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-05 16:08 ` mmitchel at gcc dot gnu dot org
2005-09-06 15:15 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-05 16:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-05 16:08 -------
Fixed in 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/21440] [4.0/4.1 Regression] ICE with statement-as-expression
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
` (10 preceding siblings ...)
2005-09-05 16:08 ` mmitchel at gcc dot gnu dot org
@ 2005-09-06 15:15 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-06 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-06 15:15 -------
*** Bug 23636 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gj at pointblue dot com dot
| |pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-09-06 15:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07 8:27 [Bug c++/21440] New: [4.0 Regression] ICE with statement-as-expression dank at kegel dot com
2005-05-07 8:31 ` [Bug c++/21440] " dank at kegel dot com
2005-05-07 15:02 ` [Bug c++/21440] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-05-09 20:44 ` pinskia at gcc dot gnu dot org
2005-06-02 10:01 ` nathan at gcc dot gnu dot org
2005-06-02 11:41 ` nathan at gcc dot gnu dot org
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-07-25 12:21 ` reichelt at gcc dot gnu dot org
2005-09-03 21:32 ` mmitchel at gcc dot gnu dot org
2005-09-05 15:59 ` cvs-commit at gcc dot gnu dot org
2005-09-05 16:01 ` cvs-commit at gcc dot gnu dot org
2005-09-05 16:08 ` mmitchel at gcc dot gnu dot org
2005-09-06 15:15 ` mmitchel 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).