public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE
@ 2003-06-23 15:52 jfc at legra dot com
  2003-06-23 15:55 ` [Bug c++/11295] " jfc at legra dot com
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: jfc at legra dot com @ 2003-06-23 15:52 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295

           Summary: *reinterpret_cast<std::string *> causes ICE
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jfc at legra dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

I tried to make a fake std::string value using reinterpret_cast and got a core dump.

Source:
#include <string>
std::string fakefoo()
{
  return
  ({static char rep[] = { "\0\0\x00\x04\0\0\x00\x04\0\0\0\0" "foo?"};
   struct { void *p; } p = {&rep[12]};
   *reinterpret_cast<std::string *>(&p);})
    ;
}

With gcc 3.3 on i386-linux I get
str.ii:5700: internal compiler error: in cp_expr_size, at cp/cp-lang.c:312

with gcc 3.2.1 or gcc3.2.2 on Linux, mips, or SPARC I get
str.ii:5700: Internal compiler error in simplify_gen_subreg, at simplify-rtx.c:
   2711

This happens regardless of optimization level.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
@ 2003-06-23 15:55 ` jfc at legra dot com
  2003-06-23 16:02 ` [Bug c++/11295] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: jfc at legra dot com @ 2003-06-23 15:55 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295



------- Additional Comments From jfc at legra dot com  2003-06-23 15:54 -------
Created an attachment (id=4268)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4268&action=view)
preprocessed source code

Preprocessed source.

(Regarding original description -- should say "internal compiler error", not
"core dump".)


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 Regression] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
  2003-06-23 15:55 ` [Bug c++/11295] " jfc at legra dot com
@ 2003-06-23 16:02 ` pinskia at physics dot uc dot edu
  2003-06-23 16:42 ` bangerth at dealii dot org
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-23 16:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-23 16:02:12
               date|                            |
            Summary|*reinterpret_cast<std::strin|[3.3/3.4 Regression]
                   |g *> causes ICE             |*reinterpret_cast<std::strin
                   |                            |g *> causes ICE


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-23 16:02 -------
I do not know if this is valid code as 3.0.4 rejected it and 2.95.3 accepted it.
But it does ICE's on 3.2.2, 3.2.3, and 3.3.1 (20030616) and the mainline (20030623).


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 Regression] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
  2003-06-23 15:55 ` [Bug c++/11295] " jfc at legra dot com
  2003-06-23 16:02 ` [Bug c++/11295] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
@ 2003-06-23 16:42 ` bangerth at dealii dot org
  2003-06-23 22:16 ` jfc at legra dot com
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: bangerth at dealii dot org @ 2003-06-23 16:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295



------- Additional Comments From bangerth at dealii dot org  2003-06-23 16:42 -------
The code is certainly legal, but it doesn't make any sense. The result
will not be a usable string object.

It shouldn't ICE, though.

W.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 Regression] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (2 preceding siblings ...)
  2003-06-23 16:42 ` bangerth at dealii dot org
@ 2003-06-23 22:16 ` jfc at legra dot com
  2003-06-23 23:09 ` bangerth at dealii dot org
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: jfc at legra dot com @ 2003-06-23 22:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295



------- Additional Comments From jfc at legra dot com  2003-06-23 22:12 -------
No question that the behavior isn't defined, but I dispute that it can't work.

My example is derived from similar code which does seem to do what I intended.

static char c[] = {3,0,0,0, 4,0,0,0, 0,0,0,0, 'H', 'i', '!', '\0'};

std::string fakestatic()
{
  struct fakestring { void *p; } rv;
  rv.p = &c[12];
  return *reinterpret_cast<std::string *>(&rv);
}

With the particular string implementation I am using, this appears to generate a
usable std::string object.  And it doesn't crash the compiler.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 Regression] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (3 preceding siblings ...)
  2003-06-23 22:16 ` jfc at legra dot com
@ 2003-06-23 23:09 ` bangerth at dealii dot org
  2003-06-24  0:18 ` pinskia at physics dot uc dot edu
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: bangerth at dealii dot org @ 2003-06-23 23:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295



------- Additional Comments From bangerth at dealii dot org  2003-06-23 22:39 -------
Yes, that's what I meant: you'll have to emulate the byte-pattern of a
usable std::string object. But then you expose yourself to changes in
the internals of the std::string implementation. If you're fine with
that, then so am I :-)

But that's certainly not what we're talking about in this bug report,
I was just answering to Andrew's question about the legality of the
code. It's still the ICE that's the problem. 

W.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 Regression] *reinterpret_cast<std::string *> causes ICE
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (4 preceding siblings ...)
  2003-06-23 23:09 ` bangerth at dealii dot org
@ 2003-06-24  0:18 ` pinskia at physics dot uc dot edu
  2003-06-24  1:56 ` [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression giovannibajo at libero dot it
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  0:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-24 00:18 -------
Thanks Wolfgang for the explanation on how this is valid code, so this is a regression still.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (5 preceding siblings ...)
  2003-06-24  0:18 ` pinskia at physics dot uc dot edu
@ 2003-06-24  1:56 ` giovannibajo at libero dot it
  2003-07-23 13:56 ` nathan at gcc dot gnu dot org
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-24  1:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


giovannibajo at libero dot it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3/3.4 Regression]        |[3.3/3.4 regression] ICE in
                   |*reinterpret_cast<std::strin|cp_expr_size, at cp/cp-
                   |g *> causes ICE             |lang.c:314 when using a non-
                   |                            |trivial object in a compound
                   |                            |statement expression


------- Additional Comments From giovannibajo at libero dot it  2003-06-24 01:56 -------
Redux:

------------------------------
struct Bar
{
  Bar();
  Bar(const Bar&);
};

struct Foo
{
  Foo();
  Foo& operator=(const Foo& __str);

  Bar bar;
};

Foo func(void)
{
  return ({Foo f; f; });
}
------------------------------
pr11295.cpp: In function `Foo func()':
pr11295.cpp:17: internal compiler error: in cp_expr_size, at cp/cp-lang.c:314

Please, let's keep bugs unconfirmed until we have a redux, thanks.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (6 preceding siblings ...)
  2003-06-24  1:56 ` [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression giovannibajo at libero dot it
@ 2003-07-23 13:56 ` nathan at gcc dot gnu dot org
  2003-08-01  9:28 ` nathan at gcc dot gnu dot org
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-07-23 13:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (7 preceding siblings ...)
  2003-07-23 13:56 ` nathan at gcc dot gnu dot org
@ 2003-08-01  9:28 ` nathan at gcc dot gnu dot org
  2003-08-01  9:34 ` cvs-commit at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-08-01  9:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From nathan at gcc dot gnu dot org  2003-08-01 09:28 -------
2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/11295
	* cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
	tf_stmt_expr_body.
	(finish_stmt_expr_expr): Declare.
	* parser.c (cp_parser_primary_expression): Tell
	cp_parser_compount_statement that it is a statement expression.
	(cp_parser_statement, cp_parser_labeled_statement,
	cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
	in_statement_expr_p parameter.
	(cp_parser_expression_statement): Likewise. Call
	finish_stmt_expr_expr for final expression of a statement
	expression.
	(cp_parser_for_init_statement,
	cp_parser_implicitly_scoped_statement,
	cp_parser_already_scoped_statement, cp_parser_function_definition,
	cp_parser_try_block, cp_parser_handled): Adjust.
	* pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
	(tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
	(tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
	* semantics.c (finish_expr_stmt): Do not deal with statement
	expressions.
	(begin_stmt_expr): Clear last_expr_type.
	(finish_stmt_expr_expr): New.
	(finish_stmt_expr): Process the value expression.

2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/11295
	* doc/extend.texi (Statement Expressions): Document C++ semantics.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (8 preceding siblings ...)
  2003-08-01  9:28 ` nathan at gcc dot gnu dot org
@ 2003-08-01  9:34 ` cvs-commit at gcc dot gnu dot org
  2004-01-08 23:59 ` pinskia at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-01  9:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-01 09:34 -------
Subject: Bug 11295

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2003-08-01 09:34:09

Modified files:
	gcc/cp         : ChangeLog cp-tree.h parser.c pt.c semantics.c 
	gcc            : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/doc        : extend.texi 
Added files:
	gcc/testsuite/g++.dg/ext: stmtexpr1.C 

Log message:
	PR c++/11295
	* doc/extend.texi (Statement Expressions): Document C++ semantics.
	cp:
	PR c++/11295
	* cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
	tf_stmt_expr_body.
	(finish_stmt_expr_expr): Declare.
	* parser.c (cp_parser_primary_expression): Tell
	cp_parser_compount_statement that it is a statement expression.
	(cp_parser_statement, cp_parser_labeled_statement,
	cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
	in_statement_expr_p parameter.
	(cp_parser_expression_statement): Likewise. Call
	finish_stmt_expr_expr for final expression of a statement
	expression.
	(cp_parser_for_init_statement,
	cp_parser_implicitly_scoped_statement,
	cp_parser_already_scoped_statement, cp_parser_function_definition,
	cp_parser_try_block, cp_parser_handled): Adjust.
	* pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
	(tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
	(tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
	* semantics.c (finish_expr_stmt): Do not deal with statement
	expressions.
	(begin_stmt_expr): Clear last_expr_type.
	(finish_stmt_expr_expr): New.
	(finish_stmt_expr): Process the value expression.
	testsuite:
	PR c++/11295
	* g++.dg/ext/stmtexpr1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3576&r2=1.3577
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.893&r2=1.894
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.94&r2=1.95
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.745&r2=1.746
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.340&r2=1.341
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.682&r2=2.683
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2941&r2=1.2942
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&r1=1.152&r2=1.153
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (9 preceding siblings ...)
  2003-08-01  9:34 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-08 23:59 ` pinskia at gcc dot gnu dot org
  2004-01-21 23:16 ` schwab at suse dot de
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-08 23:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-08 23:59 -------
*** Bug 13621 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (10 preceding siblings ...)
  2004-01-08 23:59 ` pinskia at gcc dot gnu dot org
@ 2004-01-21 23:16 ` schwab at suse dot de
  2004-01-21 23:23 ` pinskia at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-01-21 23:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-01-21 23:16 -------
The bug reappeared on 3.4/3.5 at 2004-01-10, see  
<http://gcc.gnu.org/ml/gcc-testresults/2004-01/msg00418.html>.  

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (11 preceding siblings ...)
  2004-01-21 23:16 ` schwab at suse dot de
@ 2004-01-21 23:23 ` pinskia at gcc dot gnu dot org
  2004-01-21 23:47 ` schwab at suse dot de
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-21 23:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-21 23:23 -------
What is the ICE on ia64, it works just fine on powerpc and x86.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schwab at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (12 preceding siblings ...)
  2004-01-21 23:23 ` pinskia at gcc dot gnu dot org
@ 2004-01-21 23:47 ` schwab at suse dot de
  2004-01-22 16:07 ` [Bug c++/11295] [3.4/3.5 " pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-01-21 23:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-01-21 23:47 -------
It ICE's at cp/cp-lang.c:347, which appears to be the same place as in the 
original report. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (13 preceding siblings ...)
  2004-01-21 23:47 ` schwab at suse dot de
@ 2004-01-22 16:07 ` pinskia at gcc dot gnu dot org
  2004-01-22 17:41 ` schwab at suse dot de
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-22 16:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-22 16:07 -------
I do not see this on 3.5 on i686-pc-linux or powerpc-apple-darwin, I do not think the C++ front-
end is different between 3.4 and 3.5 at all, I am wonding if this was just a fluk or you have a 
problem with your sources with a tag.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|*-*-*                       |ia64-suse-linux-gnu
            Summary|[3.3/3.4 regression] ICE in |[3.4/3.5 regression] ICE in
                   |cp_expr_size, at cp/cp-     |cp_expr_size, at cp/cp-
                   |lang.c:314 when using a non-|lang.c:314 when using a non-
                   |trivial object in a compound|trivial object in a compound
                   |statement expression        |statement expression


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (14 preceding siblings ...)
  2004-01-22 16:07 ` [Bug c++/11295] [3.4/3.5 " pinskia at gcc dot gnu dot org
@ 2004-01-22 17:41 ` schwab at suse dot de
  2004-01-22 17:54 ` schwab at suse dot de
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-01-22 17:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-01-22 17:41 -------
It still fails in both 3.4 and 3.5 as of today. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (15 preceding siblings ...)
  2004-01-22 17:41 ` schwab at suse dot de
@ 2004-01-22 17:54 ` schwab at suse dot de
  2004-02-01 22:29 ` schwab at suse dot de
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-01-22 17:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-01-22 17:54 -------
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

It still fails with both 3.4 and 3.5 as of today.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (16 preceding siblings ...)
  2004-01-22 17:54 ` schwab at suse dot de
@ 2004-02-01 22:29 ` schwab at suse dot de
  2004-02-02 17:46 ` mmitchel at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-02-01 22:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-01 22:29 -------
This is the change that re-triggered the bug: 
 
2004-01-09  Mark Mitchell  <mark@codesourcery.com> 
 
	* expr.h (expand_expr): Make it a macro, not a function. 
	(expand_expr_real): New function. 
	* expr.c (store_expr): Adjust logic for deciding whether or not to 
	copy the value returned by expand_expr. 
	(expand_expr): Rename to ... 
	(expand_expr_real): ... this.  Add alt_rtl parameter.  Adjust 
	calls to language hooks. 
	* c-common.h (c_expand_expr): Adjust prototype. 
	* c-common.c (c_expand_expr): Add alt_rtl parameter. 
	* langhooks-def.h (lhd_expand_expr): Change prototype. 
	* langhooks.c (lhd_expand_expr): Add all_rtl parameter. 
	* langhooks.h (lang_hooks): Change type of expand_expr. 
	* stmt.c (stmt_status): Add x_last_expr_alt_rtl. 
	(last_expr_alt_rtl): Likewise. 
	(expand_expr_stmt_value): Set last_expr_alt_rtl. 
	(clear_last_expr): Clear it. 
	(expand_end_stmt_expr): Set RTL_EXPR_ATL_RTL. 
	(expand_end_bindings): Save and restor last_expr_alt_rtl. 
	* tree.def (RTL_EXPR): Give it an additional operand. 
	* tree.h (RTL_EXPR_ALT_RTL): New macro. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|nathan at gcc dot gnu dot   |mark at codesourcery dot com
                   |org                         |
             Status|REOPENED                    |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (17 preceding siblings ...)
  2004-02-01 22:29 ` schwab at suse dot de
@ 2004-02-02 17:46 ` mmitchel at gcc dot gnu dot org
  2004-02-03  0:06 ` schwab at suse dot de
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-02 17:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-02 17:45 -------
I could not reproduce this on the 3.4 branch on i686-pc-linux-gnu.  

Is it still happening?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (18 preceding siblings ...)
  2004-02-02 17:46 ` mmitchel at gcc dot gnu dot org
@ 2004-02-03  0:06 ` schwab at suse dot de
  2004-02-05 19:43 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-02-03  0:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-03 00:06 -------
It's ia64 specific.  See 
<http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00077.html> and 
<http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00080.html>. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (19 preceding siblings ...)
  2004-02-03  0:06 ` schwab at suse dot de
@ 2004-02-05 19:43 ` mmitchel at gcc dot gnu dot org
  2004-02-05 23:10 ` wilson at specifixinc dot com
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-05 19:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-05 19:42 -------
I cannot reproduce this using the small test case in this PR with a
cross-compiler for ia64-none-elf.

Andreas, would you please attach preprocessed source for ia64-suse-linux-gnu?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (20 preceding siblings ...)
  2004-02-05 19:43 ` mmitchel at gcc dot gnu dot org
@ 2004-02-05 23:10 ` wilson at specifixinc dot com
  2004-02-05 23:14 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: wilson at specifixinc dot com @ 2004-02-05 23:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at specifixinc dot com  2004-02-05 23:10 -------
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:
> ------- Additional Comments From schwab at suse dot de  2004-02-03 00:06 -------
> It's ia64 specific.  See 
> <http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00077.html> and 
> <http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00080.html>. 

I don't see any ICEs in the C++ front end.  I am seeing ICEs in 
force_type_die in dwarf2out.c, which was added 2004-01-27 by Devang 
Patel.  I see he just checked in a patch which might fix this.

Maybe this got confused with some other IA-64 problem, such as the 
CSELIB_PTR_VAL problems?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (21 preceding siblings ...)
  2004-02-05 23:10 ` wilson at specifixinc dot com
@ 2004-02-05 23:14 ` pinskia at gcc dot gnu dot org
  2004-02-06  0:50 ` schwab at suse dot de
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-05 23:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-05 23:14 -------
The fix for force_type_die ICE was checked in, so you should not be seeing it anymore.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (22 preceding siblings ...)
  2004-02-05 23:14 ` pinskia at gcc dot gnu dot org
@ 2004-02-06  0:50 ` schwab at suse dot de
  2004-02-06  2:43 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-02-06  0:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-06 00:50 -------
>From today <http://gcc.gnu.org/ml/gcc-testresults/2004-02/msg00230.html>: 
 
$ /tmp/cvs/gcc-20040205/Build/gcc/testsuite/../g++ 
-B/tmp/cvs/gcc-20040205/Build/gcc/testsuite/../ /tmp/cvs/gcc-20040205/gcc/testsuite/g++.dg/ext/stmtexpr1.C 
-nostdinc++ 
-I/tmp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux 
-I/tmp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++ 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++ 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/include/backward 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/testsuite -fmessage-length=0 
-L/tmp/cvs/gcc-20040205/Build/ia64-suse-linux/./libstdc++-v3/src/.libs 
-L/tmp/cvs/gcc-20040205/Build/ia64-suse-linux/./libiberty -lm 
-o ./stmtexpr1.exe -v 
Reading specs from /tmp/cvs/gcc-20040205/Build/gcc/testsuite/../specs 
Configured with: ../configure --host=ia64-suse-linux --enable-shared 
--enable-th 
reads --with-system-zlib 
Thread model: posix 
gcc version 3.4.0 20040205 (prerelease) 
 /tmp/cvs/gcc-20040205/Build/gcc/testsuite/../cc1plus -quiet -nostdinc++ -v 
-I/t 
mp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux 
- 
I/tmp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++ 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++ 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/include/backward 
-I/tmp/cvs/gcc-20040205/libstdc++-v3/testsuite 
-iprefix /tmp/cvs/gcc-20040205/Build/gcc/../lib/gcc/ia64-suse-linux/3.4.0/ 
-isystem /tmp/cvs/gcc-20040205/Build/gcc/testsuite/../include 
-D_GNU_SOURCE /tmp/cvs/gcc-20040205/gcc/testsuite/g++.dg/ext/stmtexpr1.C 
-quiet -dumpbase stmtexpr1.C -auxbase stmtexpr1 -version -fmessage-length=0 
-o /tmp/ccbPK4GZ.s 
ignoring nonexistent directory 
"/tmp/cvs/gcc-20040205/Build/gcc/../lib/gcc/ia64-suse-linux/3.4.0/include" 
ignoring nonexistent directory 
"/tmp/cvs/gcc-20040205/Build/gcc/../lib/gcc/ia64-suse-linux/3.4.0/../../../../ia64-suse-linux/include" 
ignoring nonexistent directory "NONE/include" 
ignoring nonexistent directory 
"/usr/local/lib/gcc/ia64-suse-linux/3.4.0/include" 
ignoring nonexistent directory "/usr/local/lib/../ia64-suse-linux/include" 
ignoring duplicate directory "/tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++" 
#include "..." search starts here: 
#include <...> search starts here: 
 /tmp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux 
 /tmp/cvs/gcc-20040205/Build/ia64-suse-linux/libstdc++-v3/include 
 /tmp/cvs/gcc-20040205/libstdc++-v3/libsupc++ 
 /tmp/cvs/gcc-20040205/libstdc++-v3/include/backward 
 /tmp/cvs/gcc-20040205/libstdc++-v3/testsuite 
 /tmp/cvs/gcc-20040205/Build/gcc/testsuite/../include 
 /usr/local/include 
 /usr/include 
End of search list. 
GNU C++ version 3.4.0 20040205 (prerelease) (ia64-suse-linux) 
        compiled by GNU C version 3.4.0 20040205 (prerelease). 
GGC heuristics: --param ggc-min-expand=95 --param ggc-min-heapsize=122124 
/tmp/cvs/gcc-20040205/gcc/testsuite/g++.dg/ext/stmtexpr1.C: In function `int 
main()': 
/tmp/cvs/gcc-20040205/gcc/testsuite/g++.dg/ext/stmtexpr1.C:48: internal 
compiler error: in cp_expr_size, at cp/cp-lang.c:347 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (23 preceding siblings ...)
  2004-02-06  0:50 ` schwab at suse dot de
@ 2004-02-06  2:43 ` pinskia at gcc dot gnu dot org
  2004-02-07  9:17 ` wilson at specifixinc dot com
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-06  2:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-06 02:43 -------
I can reproduce it on a cross to ia64-suse-linux-gnu.
Here is the backtrace:
#0  fancy_abort (file=0x701120 "../../gcc/cp/cp-lang.c", line=347, function=0x70118c 
"cp_expr_size") at ../../gcc/diagnostic.c:584
#1  0x001d63ec in cp_expr_size (exp=0x88ad70) at ../../gcc/cp/cp-lang.c:347
#2  0x003a1880 in expr_size (exp=0x88ad70) at ../../gcc/explow.c:243
#3  0x003b1d08 in store_expr (exp=0x88ad70, target=0x866d74, want_value=0) at ../../gcc/
expr.c:4228
#4  0x003db294 in expand_expr_real (exp=0x8881a0, target=0x866d74, tmode=VOIDmode, 
modifier=EXPAND_CONST_ADDRESS, alt_rtl=0x0) at ../../gcc/expr.c:8621
#5  0x003dcb70 in expand_expr_real (exp=0x88ad84, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../gcc/expr.c:8736
#6  0x003ca1c0 in expand_expr_real (exp=0x88ade8, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../gcc/expr.c:7519
#7  0x003ca1c0 in expand_expr_real (exp=0x88adfc, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../gcc/expr.c:7519
#8  0x00486a9c in precompute_arguments (flags=0, num_actuals=1, args=0xbfffde70) at ../../
gcc/calls.c:1404
#9  0x0048a080 in expand_call (exp=0x411d2c48, target=0x0, ignore=1) at ../../gcc/calls.c:2737
#10 0x003c9410 in expand_expr_real (exp=0x411d2c48, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../gcc/expr.c:7461
#11 0x003b0760 in store_expr (exp=0x411d2cf0, target=0x866d38, want_value=0) at ../../gcc/
expr.c:4022
#12 0x003db294 in expand_expr_real (exp=0x8882a0, target=0x866d38, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../gcc/expr.c:8621
#13 0x003be19c in expand_expr_real (exp=0x88dba4, target=0x411c6300, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0xbffff108) at ../../gcc/expr.c:6246
#14 0x0045a88c in expand_expr_stmt_value (exp=0x88dba4, want_value=0, maybe_last=0) at ../
../gcc/stmt.c:2168
#15 0x00237540 in genrtl_expr_stmt_value (expr=0x88dba4, want_value=0, maybe_last=0) at ../
../gcc/c-semantics.c:355
#16 0x0023afe8 in expand_stmt (t=0x88dbb8) at ../../gcc/c-semantics.c:799
#17 0x0023a5b4 in genrtl_compound_stmt (t=0x86d0dc) at ../../gcc/c-semantics.c:719
#18 0x0023b030 in expand_stmt (t=0x86d0dc) at ../../gcc/c-semantics.c:826
#19 0x0023a5b4 in genrtl_compound_stmt (t=0x86d0a0) at ../../gcc/c-semantics.c:719
#20 0x0023b030 in expand_stmt (t=0x86d0a0) at ../../gcc/c-semantics.c:826
#21 0x00497f98 in tree_rest_of_compilation (fndecl=0x86c89c, nested_p=false) at ../../gcc/tree-
optimize.c:144
#22 0x001ac748 in expand_body (fn=0x86c89c) at ../../gcc/cp/semantics.c:2901
#23 0x0047e140 in cgraph_expand_function (node=0x8a00e8) at ../../gcc/cgraphunit.c:534
#24 0x0047cbfc in cgraph_assemble_pending_functions () at ../../gcc/cgraphunit.c:143
#25 0x0047ce14 in cgraph_finalize_function (decl=0x86c89c, nested=false) at ../../gcc/
cgraphunit.c:224
#26 0x001accbc in expand_or_defer_fn (fn=0x86c89c) at ../../gcc/cp/semantics.c:2984
#27 0x0013cc94 in cp_parser_function_definition_after_declarator (parser=0x413bc1d0, 
inline_p=false) at ../../gcc/cp/parser.c:14231
#28 0x0013cb00 in cp_parser_function_definition_from_specifiers_and_declarator 
(parser=0x413bc1d0, decl_specifiers=0x86d050, attributes=0x0, declarator=0x411d2738) at ../
../gcc/cp/parser.c:14169
#29 0x00133dac in cp_parser_init_declarator (parser=0x413bc1d0, decl_specifiers=0x86d050, 
prefix_attributes=0x0, function_definition_allowed_p=true, member_p=false, 
declares_class_or_enum=0, function_definition_p=0xbffff834) at ../../gcc/cp/parser.c:9978
#30 0x0012e690 in cp_parser_simple_declaration (parser=0x413bc1d0, 
function_definition_allowed_p=true) at ../../gcc/cp/parser.c:6538
#31 0x0012e588 in cp_parser_block_declaration (parser=0x413bc1d0, statement_p=false) at ../../
gcc/cp/parser.c:6454
#32 0x0012e3f0 in cp_parser_declaration (parser=0x413bc1d0) at ../../gcc/cp/parser.c:6374
#33 0x0012e168 in cp_parser_declaration_seq_opt (parser=0x413bc1d0) at ../../gcc/cp/parser.c:
6283
#34 0x0012815c in cp_parser_translation_unit (parser=0x413bc1d0) at ../../gcc/cp/parser.c:2383
#35 0x0013f87c in c_parse_file () at ../../gcc/cp/parser.c:15273
#36 0x00252208 in c_common_parse_file (set_yydebug=0) at ../../gcc/c-opts.c:1235
#37 0x00299dbc in compile_file () at ../../gcc/toplev.c:1813
#38 0x002a0a28 in do_compile () at ../../gcc/toplev.c:4642
#39 0x002a0b0c in toplev_main (argc=2, argv=0xbffffcb4) at ../../gcc/toplev.c:4682
#40 0x00258488 in main (argc=2, argv=0xbffffcb4) at ../../gcc/main.c:35

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-07-30 04:28:37         |2004-02-06 02:43:44
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (24 preceding siblings ...)
  2004-02-06  2:43 ` pinskia at gcc dot gnu dot org
@ 2004-02-07  9:17 ` wilson at specifixinc dot com
  2004-02-07 16:15 ` schwab at suse dot de
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: wilson at specifixinc dot com @ 2004-02-07  9:17 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (25 preceding siblings ...)
  2004-02-07  9:17 ` wilson at specifixinc dot com
@ 2004-02-07 16:15 ` schwab at suse dot de
  2004-02-07 20:55 ` mark at codesourcery dot com
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: schwab at suse dot de @ 2004-02-07 16:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-07 16:15 -------
Regtested on 3.4 branch (mainline is currently broken on ia64).  No difference 
in test results except that g++.dg/ext/stmtexpr1.C now passes.  Also fixes a 
build failure in ada/acats/tests/ce/ce3705d. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (26 preceding siblings ...)
  2004-02-07 16:15 ` schwab at suse dot de
@ 2004-02-07 20:55 ` mark at codesourcery dot com
  2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: mark at codesourcery dot com @ 2004-02-07 20:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-02-07 20:55 -------
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

wilson at specifixinc dot com wrote:

>------- 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.
>
>  
>
I was actually just testing the exact same fix. 

Thanks for fixing this, even thought it was assigned to me!

Please check that in, if you would.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (27 preceding siblings ...)
  2004-02-07 20:55 ` mark at codesourcery dot com
@ 2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
  2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-09 21:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-09 21:32 -------
Subject: Bug 11295

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	wilson@gcc.gnu.org	2004-02-09 21:32:38

Modified files:
	gcc            : ChangeLog c-common.c 

Log message:
	PR c++/11295
	* 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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2722&r2=2.2723
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.481&r2=1.482



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (28 preceding siblings ...)
  2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
  2004-02-09 23:21 ` wilson at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-09 21:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-09 21:32 -------
Subject: Bug 11295

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	wilson@gcc.gnu.org	2004-02-09 21:32:05

Modified files:
	gcc            : ChangeLog c-common.c 

Log message:
	PR c++/11295
	* 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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.167&r2=2.2326.2.168
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.476.4.3&r2=1.476.4.4



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [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
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (29 preceding siblings ...)
  2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-09 23:21 ` wilson at gcc dot gnu dot org
  2004-03-15 17:42 ` [Bug c++/11295] [3.3 regression] ICE " reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: wilson at gcc dot gnu dot org @ 2004-02-09 23:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2004-02-09 23:21 -------
Patch checked in on mainline and 3.4 branch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3 regression] ICE when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (30 preceding siblings ...)
  2004-02-09 23:21 ` wilson at gcc dot gnu dot org
@ 2004-03-15 17:42 ` reichelt at gcc dot gnu dot org
  2004-04-18 17:29 ` gdr at gcc dot gnu dot org
  2004-04-18 17:43 ` pinskia at gcc dot gnu dot org
  33 siblings, 0 replies; 35+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-15 17:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-03-15 17:42 -------
This (Giovanni's redux in comment #7) still doesn't compile on the 3.3 branch.
Since 3.3.2 the compiler runs into an infinite loop on my machine
(i686-pc-linux-gnu).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org
             Status|RESOLVED                    |REOPENED
 GCC target triplet|ia64-suse-linux-gnu         |
      Known to fail|                            |3.3 3.3.1 3.3.2 3.3.3
      Known to work|3.3                         |3.2.3
         Resolution|FIXED                       |
            Summary|[3.4/3.5 regression] ICE in |[3.3 regression] ICE when
                   |cp_expr_size, at cp/cp-     |using a non-trivial object
                   |lang.c:314 when using a non-|in a compound statement
                   |trivial object in a compound|expression
                   |statement expression        |
   Target Milestone|3.4.0                       |3.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3 regression] ICE when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (31 preceding siblings ...)
  2004-03-15 17:42 ` [Bug c++/11295] [3.3 regression] ICE " reichelt at gcc dot gnu dot org
@ 2004-04-18 17:29 ` gdr at gcc dot gnu dot org
  2004-04-18 17:43 ` pinskia at gcc dot gnu dot org
  33 siblings, 0 replies; 35+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-04-18 17:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-04-18 17:13 -------
Won't fix in 3.3.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Bug c++/11295] [3.3 regression] ICE when using a non-trivial object in a compound statement expression
  2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
                   ` (32 preceding siblings ...)
  2004-04-18 17:29 ` gdr at gcc dot gnu dot org
@ 2004-04-18 17:43 ` pinskia at gcc dot gnu dot org
  33 siblings, 0 replies; 35+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-18 17:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.4                       |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11295


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2004-04-18 17:26 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-23 15:52 [Bug c++/11295] New: *reinterpret_cast<std::string *> causes ICE jfc at legra dot com
2003-06-23 15:55 ` [Bug c++/11295] " jfc at legra dot com
2003-06-23 16:02 ` [Bug c++/11295] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
2003-06-23 16:42 ` bangerth at dealii dot org
2003-06-23 22:16 ` jfc at legra dot com
2003-06-23 23:09 ` bangerth at dealii dot org
2003-06-24  0:18 ` pinskia at physics dot uc dot edu
2003-06-24  1:56 ` [Bug c++/11295] [3.3/3.4 regression] ICE in cp_expr_size, at cp/cp-lang.c:314 when using a non-trivial object in a compound statement expression giovannibajo at libero dot it
2003-07-23 13:56 ` nathan at gcc dot gnu dot org
2003-08-01  9:28 ` nathan at gcc dot gnu dot org
2003-08-01  9:34 ` cvs-commit at gcc dot gnu dot org
2004-01-08 23:59 ` pinskia at gcc dot gnu dot org
2004-01-21 23:16 ` schwab at suse dot de
2004-01-21 23:23 ` pinskia at gcc dot gnu dot org
2004-01-21 23:47 ` schwab at suse dot de
2004-01-22 16:07 ` [Bug c++/11295] [3.4/3.5 " pinskia at gcc dot gnu dot org
2004-01-22 17:41 ` schwab at suse dot de
2004-01-22 17:54 ` schwab at suse dot de
2004-02-01 22:29 ` schwab at suse dot de
2004-02-02 17:46 ` mmitchel at gcc dot gnu dot org
2004-02-03  0:06 ` schwab at suse dot de
2004-02-05 19:43 ` mmitchel at gcc dot gnu dot org
2004-02-05 23:10 ` wilson at specifixinc dot com
2004-02-05 23:14 ` pinskia at gcc dot gnu dot org
2004-02-06  0:50 ` schwab at suse dot de
2004-02-06  2:43 ` pinskia at gcc dot gnu dot org
2004-02-07  9:17 ` wilson at specifixinc dot com
2004-02-07 16:15 ` schwab at suse dot de
2004-02-07 20:55 ` mark at codesourcery dot com
2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
2004-02-09 21:32 ` cvs-commit at gcc dot gnu dot org
2004-02-09 23:21 ` wilson at gcc dot gnu dot org
2004-03-15 17:42 ` [Bug c++/11295] [3.3 regression] ICE " reichelt at gcc dot gnu dot org
2004-04-18 17:29 ` gdr at gcc dot gnu dot org
2004-04-18 17:43 ` pinskia 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).