Debian Codegraph @

gcc/testsuite/g++.dg/lto/pr65276_0.C

raw
1 // { dg-lto-do link }
2 // { dg-lto-options {{-flto -O0 -std=c++11}} }
3
4 /* pr65276_0.C should get compiled with -O0, while the _1.C file
5 should get compiled with -O2, and the entire thing should be linked
6 with -O0. Test that we don't get an ICE. */
7
8 extern "C++"
9 {
10 namespace std2
11 {
12 class exception
13 {
14 public:
15 virtual ~ exception () noexcept;
16 };
17 }
18 }
19 namespace std2
20 {
21 struct __cow_string
22 {
23 union
24 {
25 const char *_M_p;
26 char _M_bytes[sizeof (const char *)];
27 };
28 };
29 class runtime_error:public exception
30 {
31 __cow_string _M_msg;
32 };
33 }
34 namespace std2
35 {
36 class system_error:public std2::runtime_error
37 {
38 };
39 enum _Ios_Fmtflags
40 {
41 };
42 inline constexpr _Ios_Fmtflags operator& (_Ios_Fmtflags __a,
43 _Ios_Fmtflags __b)
44 {
45 return _Ios_Fmtflags ();
46 }
47 enum _Ios_Openmode
48 {
49 };
50 class ios_base
51 {
52 public:
53 class __attribute ((__abi_tag__ ("cxx11"))) failure:public system_error
54 {
55 };
56 class Init
57 {
58 };
59 };
60 static ios_base::Init __ioinit;
61 }
62
63 std2::exception::~exception() noexcept { }