1 /* { dg-do run } */
2 
3 struct Dummy {};
4 struct RefCount : public Dummy {
5     ~RefCount(); /* Has to be non-pod.  */
6     int *a;
7     int *b;
8 };
~RefCount()9 RefCount::~RefCount(){}
10 struct Wrapper : public Dummy { RefCount ref; };
11 void __attribute__((noinline,noclone))
Push(Wrapper ptr)12 Push(Wrapper ptr)
13 {
14   *ptr.ref.b = 0;
15 }
16 extern "C" void abort (void);
main()17 int main()
18 {
19   int a = 1, b = 1;
20   Wrapper x;
21   x.ref.a = &a;
22   x.ref.b = &b;
23   Push(x);
24   if (b != 0)
25     abort ();
26   return 0;
27 }
28