[C++,testsuite,committed,as,obvious] PR 49917

Submitted by Paolo Carlini on July 30, 2011, 8:32 p.m.

Details

Message ID 4E346A4C.1070006@oracle.com
State New
Headers show

Commit Message

Paolo Carlini July 30, 2011, 8:32 p.m.
Hi,

I'm committing as obvious a fix to this testcase, which is meant to test 
a runtime issue (c++/13865).

Thanks,
Paolo.

/////////////////////
2011-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR testsuite/49917
	* g++.dg/init/for1.C: Fix.

Patch hide | download patch | download mbox

Index: g++.dg/init/for1.C
===================================================================
--- g++.dg/init/for1.C	(revision 176961)
+++ g++.dg/init/for1.C	(working copy)
@@ -1,6 +1,8 @@ 
 // PR c++/13865
 // Bug: We were destroying 'a' before executing the loop.
 
+// { dg-do run }
+
 #include <stdio.h>
 
 int i;
@@ -13,7 +15,7 @@  class A
   ~A()
   {
     printf("A dtor\n");
-    if (i != 1)
+    if (i != 2)
       r = 1;
   }
 };