this testcase segfaults:
=== Cut ===
class A
{
public:
A()·{ x1 = 0; x2 = -1; }
int· x()· · const { return x1; }
void setX( int x ) { x1 = x; }
int· width()· const { return x2 - x1 + 1; }
void setWidth( int w );
private:
int x1;
int x2;
};
A breakme()
{
A r;
for( int i=0 ; i < 2; i++ )
{
if (r.width() < r.x())
r.setX(4);
if (5 > r.width())
r.setWidth(r.x());
}
return r;
}
=== Cut ===
g++ -O2 -c test.cpp
test.cpp:17: internal compiler error: in create_component_ref_by_pieces, at
tree-ssa-pre.c:2167
--
Summary: ICE in create_component_ref_by_pieces
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mueller at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26212