OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [crash49.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// Origin: Loring Holden 
// Origin: Loring Holden 
template 
template 
class REFptr {
class REFptr {
   public:
   public:
      virtual ~REFptr();
      virtual ~REFptr();
      REFptr &operator =  (const REFptr& p);
      REFptr &operator =  (const REFptr& p);
};
};
class STR { };
class STR { };
class str_ptr : public REFptr { };
class str_ptr : public REFptr { };
template 
template 
class ARRAY {
class ARRAY {
 protected:
 protected:
   T      *_array;
   T      *_array;
   int     _num;
   int     _num;
   int     _max;
   int     _max;
 public:
 public:
   virtual void realloc(int new_max) {
   virtual void realloc(int new_max) {
       _max = new_max;
       _max = new_max;
       T *tmp = new T [_max];
       T *tmp = new T [_max];
       if (tmp == 0) return;
       if (tmp == 0) return;
       for (int i=0; i<_num; i++) {
       for (int i=0; i<_num; i++) {
          tmp[i] = _array[i];
          tmp[i] = _array[i];
       }
       }
       delete [] _array;
       delete [] _array;
       _array = tmp;
       _array = tmp;
   }
   }
};
};
int
int
main()
main()
{
{
   ARRAY tags;
   ARRAY tags;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.