FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / crash15.C
blobf863350897b4921de35d568e478a06e7ce934d75
1 // g++ crashed because we unsaved the TARGET_EXPR for the return value
2 // for get_allocator without first expanding it, because it was part of the
3 // cleanup for the temporary string.
5 // Derived from libstdc++ v3 code.
7 // Special g++ Options: -O2
8 // Build don't link:
10 class AA {};
12 void fee (const AA&);
14 class basic_string
16 public:
17   basic_string(const char*);
19   ~basic_string() 
20   { fee (this->get_allocator()); }
22   AA get_allocator();
25 class failure
27 public:
28   failure(const basic_string& __str);
31 class foo
33 public:
34   foo(int x)
35   {
36     throw failure ("");
37   }
40 void test05()
42   foo ofs(0);