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: r118819
This commit is contained in:
parent
30cc554051
commit
1f3a64d10a
@ -1,3 +1,8 @@
|
||||
2006-11-14 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/29106
|
||||
* g++.dg/init/self1.C: New test.
|
||||
|
||||
2006-11-14 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/29657
|
||||
|
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user