This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11295] [3.4/3.5 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
- From: "wilson at specifixinc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2004 09:17:10 -0000
- Subject: [Bug c++/11295] [3.4/3.5 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
- References: <20030623155039.11295.jfc@legra.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wilson at specifixinc dot com 2004-02-07 09:17 -------
Subject: Re: [3.4/3.5 regression] ICE in cp_expr_size, at
cp/cp-lang.c:314 when using a non-trivial object in a compound statement
expression
schwab at suse dot de wrote:
> testsuite/g++.dg/ext/stmtexpr1.C
Sorry. I misread one of your earlier emails, and was confused about
what the actual testcase was here. Explicitly mentioning the testcase
name helped.
The following patch seems to work, and also seems to make sense. I have
only tested this with a cross compiler build, and only against the given
testcase.
This testcase is apparently IA-64 specific only because IA-64 does not
have REG+OFFSET memory addresses, and hence the !rtx_equal_p(temp,
target) test in store_expr fails much more often for IA-64 than other
targets.
2004-02-07 James E Wilson <wilson@specifixinc.com>
* c-common.c (c_expand_expr, case STMT_EXPR): Change expand_expr call
to expand_expr_real call, and pass in alt_rtl as last argument.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.480
diff -p -r1.480 c-common.c
*** c-common.c 3 Feb 2004 11:22:38 -0000 1.480
--- c-common.c 7 Feb 2004 09:10:11 -0000
*************** c_expand_expr (tree exp, rtx target, enu
*** 4106,4112 ****
expand_stmt (STMT_EXPR_STMT (exp));
expand_end_stmt_expr (rtl_expr);
! result = expand_expr (rtl_expr, target, tmode, modifier);
if (preserve_result && GET_CODE (result) == MEM)
{
if (GET_MODE (result) != BLKmode)
--- 4106,4112 ----
expand_stmt (STMT_EXPR_STMT (exp));
expand_end_stmt_expr (rtl_expr);
! result = expand_expr_real (rtl_expr, target, tmode, modifier, alt_rtl);
if (preserve_result && GET_CODE (result) == MEM)
{
if (GET_MODE (result) != BLKmode)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295