[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr36766.C
blob37e0d517e9e29a3e0b995ec676422558febd0dff
1 // PR tree-optimization/36766
2 // { dg-do compile }
3 // { dg-options "-O -fnon-call-exceptions" }
5 struct A
7   ~A ()
8   {
9     int *a = this->b;
10   }
11   int *b;
14 struct B : A
16   B ()
17   {
18     int *a = this->b;
19   }
20    ~B ()
21   {
22     int *a = this->b;
23   }
26 void
27 foo ()
29   B *c = new B;
30   delete c;