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]

Optimization causes ICE in egcs-19990328 on alphaev56-dec-osf4.0d



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



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