Merge from mainline.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr20458.C
blobd4e7d1a1a86fa97eb0c83ea7bf3de10ca09e39d7
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 /* The tail call optimization would inapproriately tail call the 
5    destructors due to not recognizing a call clobbered variable */
6 namespace std
8         class locale
9         {
10                 public:
11                         locale();
12                         ~locale();
13         };
16 struct B
18         std::locale _M_buf_locale;
19         virtual ~B() {}
22 struct C : public B
24         char *s;
27 void foo ()
29         C c;
32 int main()
34         foo ();
35         return 0;