Merged r158907 through r159238 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-bogus-escape-2.C
blob29414e00e366e244593b509b686c39a0fc20f891
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing" } */
4 #include<list>
6 struct A
8   virtual ~A();
9 };
11 A* foo();
13 void bar(std::list<int> x)
15   std::list<int> y = x;
16   if (*y.rbegin())
17     delete foo();