This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Optimization causes ICE in egcs-19990328 on alphaev56-dec-osf4.0d
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Optimization causes ICE in egcs-19990328 on alphaev56-dec-osf4.0d
- From: Oskar Enoksson <osken393 at student dot liu dot se>
- Date: Tue, 27 Apr 1999 20:33:56 +0200 (MET DST)
I have produced a small code piece that triggers the ICE I reported
a few weeks ago in
http://egcs.cygnus.com/ml/egcs-bugs/1999-04/msg00514.html
///// Begin opt_ice.cpp
class Foo {
public:
int t;
Foo(const int & t0): t(t0) {}
inline int CGet() const { return t; }
};
int main() {
Foo foo(3);
float f[2];
for(int i=0; i<1; i++) {}
f[0]=foo.CGet();
}
///// End opt_ice.cpp
> c++ -c opt_ice.cpp
> c++ -O1 -c opt_ice.cpp
/scratch/src/egcs-19990328/gcc/reload1.c:1057: Internal compiler
error in function reload
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
> c++ -O2 -c opt_ice.cpp
> c++ -O3 -c opt_ice.cpp
>
As can be seen, -O1 crashes. -O2 and -O3 also crash for
similair but slightly more complicated code.
If anyone wants more details, please let me know.
Regards
/Oskar
/* Oskar Enoksson, Linkoping, Sweden */