summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C')
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C b/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
new file mode 100644
index 00000000000..6bd092977cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-cfg" } */
+double a;
+void t()
+{
+ a=1;
+}
+void t1(void);
+void abort(void);
+
+void q()
+{
+ try {
+ t();
+ }
+ catch (...) {abort();}
+}
+/* We shouldnotice nothrow attribute. */
+/* { dg-final { scan-tree-dump-times "exception" 0 "cfg"} } */