This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1733: C++ ICE in copy_body_r with optimization on



>Number:         1733
>Category:       c++
>Synopsis:       C++ ICE in copy_body_r with optimization on
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 22 13:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     scott snyder
>Release:        2.97 20010122 (experimental)
>Organization:
>Environment:
System: Linux karma 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix
>Description:

G++ crashes on the source below when the -O switch is used.
The workaround i've been using is to compile the affected modules
without optimization.

>How-To-Repeat:

-----------------------------------------------------
struct TBtItem
{
   TBtItem();
};


struct TBtInnerNode
{
   TBtInnerNode();
   int     MaxIndex() const { return 10; }
};


TBtInnerNode::TBtInnerNode()
{
   new TBtItem[MaxIndex()+1];
}
-----------------------------------------------------


$ ./cc1plus -O x.cc
 int TBtInnerNode::MaxIndex() const TBtInnerNode::TBtInnerNode() TBtInnerNode::TBtInnerNode() TBtInnerNode::TBtInnerNode() TBtInnerNode::TBtInnerNode()
x.cc:10: Internal compiler error in copy_body_r, at cp/optimize.c:317
Please submit a full bug report.
 See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]