summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/compat/eh/template1_x.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/compat/eh/template1_x.C')
-rw-r--r--gcc/testsuite/g++.dg/compat/eh/template1_x.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/eh/template1_x.C b/gcc/testsuite/g++.dg/compat/eh/template1_x.C
new file mode 100644
index 000000000..5a18be789
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/eh/template1_x.C
@@ -0,0 +1,21 @@
+extern "C" void exit (int);
+extern "C" void abort (void);
+
+#include "template1.h"
+
+void template1_x ()
+{
+ int caught = 0;
+ try
+ {
+ C<int> x;
+ x.f();
+ }
+ catch (A)
+ {
+ ++caught;
+ }
+ if (caught != 1)
+ abort ();
+ exit (0);
+}