summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/static-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/static-init.cpp')
-rw-r--r--test/CodeGenCXX/static-init.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/static-init.cpp b/test/CodeGenCXX/static-init.cpp
index a67d137..750da02 100644
--- a/test/CodeGenCXX/static-init.cpp
+++ b/test/CodeGenCXX/static-init.cpp
@@ -34,3 +34,14 @@ inline void h2() {
void h3() {
h2();
}
+
+// PR6980: this shouldn't crash
+namespace test0 {
+ struct A { A(); };
+ __attribute__((noreturn)) int throw_exception();
+
+ void test() {
+ throw_exception();
+ static A r;
+ }
+}
OpenPOWER on IntegriCloud