summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lto/pr65276_0.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lto/pr65276_0.C')
-rw-r--r--gcc/testsuite/g++.dg/lto/pr65276_0.C61
1 files changed, 61 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lto/pr65276_0.C b/gcc/testsuite/g++.dg/lto/pr65276_0.C
new file mode 100644
index 0000000000..c8e96999dc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr65276_0.C
@@ -0,0 +1,61 @@
+// { dg-lto-do link }
+// { dg-lto-options {{-flto -O0 -std=c++11}} }
+
+/* pr65276_0.C should get compiled with -O0, while the _1.C file
+ should get compiled with -O2, and the entire thing should be linked
+ with -O0. Test that we don't get an ICE. */
+
+extern "C++"
+{
+ namespace std
+ {
+ class exception
+ {
+ public:
+ virtual ~ exception () noexcept;
+ };
+ }
+}
+namespace std
+{
+ struct __cow_string
+ {
+ union
+ {
+ const char *_M_p;
+ char _M_bytes[sizeof (const char *)];
+ };
+ };
+ class runtime_error:public exception
+ {
+ __cow_string _M_msg;
+ };
+}
+namespace std
+{
+ class system_error:public std::runtime_error
+ {
+ };
+ enum _Ios_Fmtflags
+ {
+ };
+ inline constexpr _Ios_Fmtflags operator& (_Ios_Fmtflags __a,
+ _Ios_Fmtflags __b)
+ {
+ return _Ios_Fmtflags ();
+ }
+ enum _Ios_Openmode
+ {
+ };
+ class ios_base
+ {
+ public:
+ class __attribute ((__abi_tag__ ("cxx11"))) failure:public system_error
+ {
+ };
+ class Init
+ {
+ };
+ };
+ static ios_base::Init __ioinit;
+}