summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/pr45569.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/eh/pr45569.C')
-rw-r--r--gcc/testsuite/g++.dg/eh/pr45569.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/pr45569.C b/gcc/testsuite/g++.dg/eh/pr45569.C
new file mode 100644
index 000000000..2c100d2b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/pr45569.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-options "-O -fnon-call-exceptions" }
+
+float f ();
+_Complex float g ();
+
+void
+i (_Complex float);
+
+float j ()
+{
+ _Complex float x = 0;
+ try
+ {
+ x = f ();
+ }
+ catch ( ...)
+ {
+ x += g ();
+ }
+ i (x);
+}
+