re PR c++/29106 (sizeof(*var) in expression drops entire line of code out of compile)

PR c++/29106
	* g++.dg/init/self1.C: New test.

From-SVN: r118818
This commit is contained in:
Mark Mitchell
2006-11-14 17:13:57 +00:00
committed by Mark Mitchell
parent 292c6ddee3
commit 68927913e4
2 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2006-11-14 Mark Mitchell <mark@codesourcery.com>
PR c++/29106
* g++.dg/init/self1.C: New test.
2006-11-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/27895

View File

@@ -0,0 +1,19 @@
// PR c++/29106
// { dg-do run }
int i;
void f(__SIZE_TYPE__) {
i = 3;
}
int main()
{
int* const savepos = sizeof(*savepos) ? 0 : 0;
f (sizeof (*savepos));
if (i != 3)
return 1;
}