[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git] / gcc / testsuite / g++.dg / init / elide3.C
blob7eb0389a3f68291963396e45ab59847788035b49
1 // PR c++/67557
2 // { dg-do run }
4 namespace std
6   struct string
7   {
8     typedef unsigned long size_type;
9     const char* _M_p;
10     char        _M_local_buf[1];
12     string(const char* s) : _M_p(_M_local_buf)
13     {
14       __builtin_printf("%p constructed\n", this);
15     }
17     string(const string& s) : _M_p(_M_local_buf)
18     {
19       __builtin_printf("%p copied from %p\n", this, &s);
20     }
22     ~string()
23     {
24       __builtin_printf("%p destroyed\n", this);
25       if (_M_p != _M_local_buf)
26         __builtin_abort();
27     }
28   };
31 struct StartTag
33   explicit StartTag(std::string const & tag) : tag_(tag), keepempty_(false) {}
34   std::string tag_;
35   bool keepempty_;
38 StartTag fontToStartTag() { return StartTag(""); }
40 struct FontTag : public StartTag
42   FontTag() : StartTag(fontToStartTag()) {}
45 int main()
47   FontTag x;
48   __builtin_printf("%p x.tag_ in main()\n", &x.tag_);
49   return 0;