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]
Other format: [Raw text]

[Bug rtl-optimization/17345] [3.5 Regression] internal compiler error: in optimize_mode_switching, at lcm.c:1225


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


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