summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr31081-1.C
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-04 11:16:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-04 11:16:17 +0000
commitc6cfbf37a23dabc181e0489620d60bc123bc1bfd (patch)
treea690fb590422323d03bb0cc0be42dc58cb9cfb29 /gcc/testsuite/g++.dg/torture/pr31081-1.C
parent6a609ad9a100a42b4629fe99aed032d767c14836 (diff)
downloadgcc-c6cfbf37a23dabc181e0489620d60bc123bc1bfd.tar.gz
2008-01-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/31081 * g++.dg/torture/pr31081-1.C: New testcase. * g++.dg/torture/pr31081-2.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131320 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/torture/pr31081-1.C')
-rw-r--r--gcc/testsuite/g++.dg/torture/pr31081-1.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/torture/pr31081-1.C b/gcc/testsuite/g++.dg/torture/pr31081-1.C
new file mode 100644
index 00000000000..cb11b2148d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr31081-1.C
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+
+static int get_record (void);
+void f(void);
+int g(void);
+static int get_record (void)
+{
+ int result;
+ try
+ {
+ result = g();
+ f();
+ }
+ catch (const int &) { }
+ return result;
+}
+int NAV_get_record ( )
+{
+ int result;
+ for (;;)
+ if (get_record ())
+ return 1;
+}