diff mbox

Fix a bug that breaks go build

Message ID CAO2gOZUPFFeq4kCWQtZNYqNmLkY_afgYfsJZ-OLh68srNaE3yw@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen Sept. 21, 2012, 3:57 p.m. UTC
This patch was checked in as
http://gcc.gnu.org/viewcvs?view=revision&revision=191614

I have another patch to add the new test. The new trunk can pass this
test. If no objection, I'll check in this patch in an hour.

Thanks,
Dehao

gcc/testsuite/ChangeLog:
2012-09-21  Dehao Chen  <dehao@google.com>

	PR go/54649
	PR tree-optimization/54655
	* g++.dg/pr54655.C: New testcase.
diff mbox

Patch

Index: gcc/testsuite/g++.dg/pr54655.C
===================================================================
--- gcc/testsuite/g++.dg/pr54655.C	(revision 0)
+++ gcc/testsuite/g++.dg/pr54655.C	(revision 0)
@@ -0,0 +1,35 @@ 
+// { dg-do compile }
+/* { dg-options "-O1" }  */
+
+extern "C" class A
+{
+};
+
+template <typename T> class B:A
+{
+public:
+    B (int *, T);
+    ~B ()
+    {
+    }
+};
+
+bool a;
+
+inline void
+fn1 ()
+{
+  switch (0)
+  case 0:
+  {
+    B <int*> b (0, 0);
+    if (a)
+      break;
+  }
+}
+
+void
+fn2 ()
+{
+  fn1 ();
+}