OSDN Git Service

2010-01-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / torture / pr42739.C
diff --git a/gcc/testsuite/g++.dg/torture/pr42739.C b/gcc/testsuite/g++.dg/torture/pr42739.C
new file mode 100644 (file)
index 0000000..ccc05f8
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+struct s { ~s() { s(); } };
+
+int f()
+{
+  M:
+    s o = s();
+    f();
+    f();
+
+  L:
+    goto *(f() ? &&L : &&M);
+
+    return 0;
+}