mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 17:11:20 +08:00
New test case
From-SVN: r28693
This commit is contained in:
parent
ea1637e9e5
commit
a9729c43a0
21
gcc/testsuite/g++.old-deja/g++.martin/eval1.c
Normal file
21
gcc/testsuite/g++.old-deja/g++.martin/eval1.c
Normal file
@ -0,0 +1,21 @@
|
||||
// Postfix expression must be evaluated even if accessing a static member.
|
||||
// execution test - XFAIL *-*-*
|
||||
|
||||
struct S
|
||||
{
|
||||
static int i;
|
||||
S* foo();
|
||||
};
|
||||
|
||||
S* S::foo(){
|
||||
i = 0;
|
||||
return this;
|
||||
};
|
||||
|
||||
int S::i = 1;
|
||||
int main(void)
|
||||
{
|
||||
S * s = new S;
|
||||
int k=(s->foo())->i;
|
||||
return k;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user