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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr48695.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
 
3
typedef __SIZE_TYPE__ size_t;
4
 
5
inline void *operator new (size_t, void *__p) throw() { return __p; }
6
 
7
struct _Vector_impl
8
{
9
  int *_M_start;
10
  int *_M_finish;
11
  _Vector_impl () :_M_start (0), _M_finish (0) {}
12
};
13
 
14
struct vector
15
{
16
  _Vector_impl _M_impl;
17
  int *_M_allocate (size_t __n)
18
  {
19
    return __n != 0 ? new int[__n] : 0;
20
  }
21
  void push_back ()
22
  {
23
    new (this->_M_impl._M_finish) int ();
24
    this->_M_impl._M_finish =
25
      this->_M_allocate (this->_M_impl._M_finish - this->_M_impl._M_start) + 1;
26
  }
27
};
28
 
29
int
30
main ()
31
{
32
  for (int i = 0; i <= 1; i++)
33
    for (int j = 0; j <= 1; j++)
34
      {
35
        vector a[2];
36
        a[i].push_back ();
37
      }
38
}

powered by: WebSVN 2.1.0

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