summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/eh2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/eh2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/eh2.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/eh2.C b/gcc/testsuite/g++.old-deja/g++.other/eh2.C
new file mode 100644
index 000000000..158ae2087
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/eh2.C
@@ -0,0 +1,18 @@
+// { dg-do assemble }
+// { dg-options "-O2" }
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+class a {
+public:
+ double b;
+ int c;
+ ~a() { }
+};
+
+int bar(a x);
+a foo(double x);
+
+int baz(double x, int y)
+{
+ return bar(foo(x));
+}