Bug 16271 - [4.0 Regression]: ICE in cp_expr_size
Summary: [4.0 Regression]: ICE in cp_expr_size
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-06-29 14:59 UTC by snyder
Modified: 2004-10-30 21:12 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.4.0
Known to fail: 4.0.0
Last reconfirmed: 2004-06-29 15:04:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description snyder 2004-06-29 14:59:18 UTC

g++ 3.5 mainline crashes on the code below:

$ g++ -c x.cc
x.cc: In constructor `D::D(C<int>)':
x.cc:15: internal compiler error: in cp_expr_size, at cp/cp-lang.c:280
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$

Environment:
System: Linux karma 2.6.7 #16 Tue Jun 22 21:52:28 EDT 2004 i686 i686 i386 GNU/Linux
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95

How-To-Repeat:

------------------------------
template <class T>
struct C
{
  C (const C& i);
  C& operator= (const C& i);

};

struct D
{
  D (C<int> it);
  C<int> _it;
};

D::D (C<int> it) : _it (it) {}
------------------------------
Comment 1 snyder 2004-06-29 14:59:18 UTC
Fix:
	<how to correct or work around the problem, if known (multiple lines)>
Comment 2 Andrew Pinski 2004-06-29 15:04:18 UTC
Confirmed, why it happens only on one of the clones I do not know.
Comment 3 Volker Reichelt 2004-07-13 22:57:32 UTC
This problem appeared with Jason's fix for PR 16115 and was fixed by
reverting the patch on 20040706:

http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00231.html