Home | History | Annotate | Download | only in jni
      1 // { dg-do run }
      2 // { dg-options "-O2" }
      3 
      4 extern "C" int printf (const char*, ...);
      5 
      6 struct _Deque_iterator {
      7   int _M_cur;
      8   int x[2];
      9   int* _M_node;
     10 
     11   _Deque_iterator() : _M_cur(0), _M_node(0) {}
     12   _Deque_iterator(const _Deque_iterator& __x)
     13     : _M_cur(__x._M_cur),
     14       _M_node(__x._M_node) {}
     15 };
     16 
     17 class _Deque_base
     18 {
     19 public:
     20   int yy;
     21 
     22   _Deque_base()
     23     : _M_start()
     24     { _M_initialize_map(); }
     25   ~_Deque_base();
     26 
     27   void _M_initialize_map();
     28   _Deque_iterator _M_start;
     29 };
     30 
     31 
     32 _Deque_base::~_Deque_base() {
     33   printf ("bb %x %x\n", this, *_M_start._M_node);
     34 }
     35 
     36 void
     37 _Deque_base::_M_initialize_map()
     38 {
     39   yy = 0x123;
     40   printf ("aa %x %x\n", this, yy);
     41 
     42   _M_start._M_node = &yy;
     43   _M_start._M_cur = yy;
     44 }
     45 
     46 
     47 class deque : protected _Deque_base
     48 {
     49 public:
     50   deque () {}
     51   deque(const deque& __x) {}
     52   ~deque() {
     53     _Deque_iterator i = _M_start;
     54   }
     55 };
     56 
     57 
     58 
     59 class GeometryAddress {
     60 public:
     61   GeometryAddress(deque addressStack) {}
     62 };
     63 
     64 void yyy (const GeometryAddress& gb)
     65 {
     66 }
     67 
     68 deque temp1;
     69 
     70 int main()
     71 {
     72   yyy (GeometryAddress (temp1));
     73   return 0;
     74 }
     75