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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [crash49.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// Origin: Loring Holden 
3
 
4
template 
5
class REFptr {
6
   public:
7
      virtual ~REFptr();
8
      REFptr &operator =  (const REFptr& p);
9
};
10
 
11
class STR { };
12
class str_ptr : public REFptr { };
13
 
14
template 
15
class ARRAY {
16
 protected:
17
   T      *_array;
18
   int     _num;
19
   int     _max;
20
 public:
21
   virtual void realloc(int new_max) {
22
       _max = new_max;
23
       T *tmp = new T [_max];
24
       if (tmp == 0) return;
25
       for (int i=0; i<_num; i++) {
26
          tmp[i] = _array[i];
27
       }
28
       delete [] _array;
29
       _array = tmp;
30
   }
31
};
32
 
33
int
34
main()
35
{
36
   ARRAY tags;
37
}

powered by: WebSVN 2.1.0

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