This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/17345] [3.5 Regression] internal compiler error: in optimize_mode_switching, at lcm.c:1225
- From: "martin at mpa-garching dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2004 09:38:57 -0000
- Subject: [Bug rtl-optimization/17345] [3.5 Regression] internal compiler error: in optimize_mode_switching, at lcm.c:1225
- References: <20040907105846.17345.wanderer@rsu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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