[Bug rtl-optimization/17345] [3.5 Regression] internal compiler error: in optimize_mode_switching, at lcm.c:1225
martin at mpa-garching dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Wed Sep 8 09:39:00 GMT 2004
------- Additional Comments From martin at mpa-garching dot mpg dot de 2004-09-08 09:38 -------
Here is a shorter testcase
(reproduced on i686-pc-linux-gnu with gcc version 3.5.0 20040908 (experimental)):
===begin===
double sqrt(double);
template <typename T> class arr
{
private:
long s;
T *d;
public:
arr() : s(0), d(0) {}
~arr() { delete[] d; }
void alloc (long sz);
const T &operator[] (long n) const {return d[n];}
};
void blah ()
{
arr<int> index;
index.alloc(10);
for (int i=0; i<10; ++i)
{
int l = int(sqrt(index[0]));
if (l<0) throw 2;
}
}
===end===
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |martin at mpa-garching dot
| |mpg dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17345
More information about the Gcc-bugs
mailing list