blob: e3eb3d6bef640ad8295b42f6c5fa2390528cf940 [file] [log] [blame]
// { dg-do run }
// Postfix expression must be evaluated even if accessing a static member.
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;
}