Merge from branches/gcc-4_8-branch up to rev 207411.
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / g++.dg / tree-ssa / new1.C
bloba859f0ac3775225b9a12e63002dfa2ddcfd76944
1 // PR c++/36633
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -Wall -fdump-tree-forwprop1" } */
5 // No particular reason for choosing forwprop1 dump to look at.
7 struct B { ~B() {} };
8 struct D : public B {};
9 //struct D {};
11 struct my_deleter
13   void operator()(D * d)
14   {
15     //    delete [] d;
16   }
19 struct smart_ptr
21   smart_ptr(D * ptr) : p(ptr) { }
22   ~smart_ptr() { d(p); }
23   D * p;
24   my_deleter d;  
27 int
28 test01()
30   smart_ptr p(new D[7]);
32   return 0;
35 int main()
37   test01();
38   return 0;
41 /* { dg-final { scan-tree-dump-not "= .* \\+ -" "forwprop1" } } */
42 /* { dg-final { cleanup-tree-dump "forwprop1" } } */