summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ipa/pr78188.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ipa/pr78188.C')
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr78188.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ipa/pr78188.C b/gcc/testsuite/g++.dg/ipa/pr78188.C
new file mode 100644
index 00000000000..f6ee654471e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr78188.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// { dg-options "-O2 -fno-exceptions" }
+
+int a;
+static void __attribute__((noinline)) foo () { a = 1; }
+static void __attribute__((noinline)) foo2 () { a = 2; }
+
+struct X
+{
+ virtual void bar (int i) { if (!i) { foo (); __builtin_abort (); } }
+};
+
+void baz (int i)
+{
+ if (!i)
+ { foo2 (); __builtin_abort (); }
+}
+
+X xx;
+