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

login
register
mail settings
Submitter Paolo Carlini
Date July 30, 2011, 8:32 p.m.
Message ID <4E346A4C.1070006@oracle.com>
Download mbox | patch
Permalink /patch/107516/
State New
Headers show

Comments

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

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;
   }
 };