mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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:
committed by
Mark Mitchell
parent
292c6ddee3
commit
68927913e4
@@ -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
|
||||
|
||||
19
gcc/testsuite/g++.dg/init/self1.C
Normal file
19
gcc/testsuite/g++.dg/init/self1.C
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user