From: Martin v. Löwis Date: Fri, 13 Aug 1999 07:25:31 +0000 (+0000) Subject: New test case X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9729c43a0c0b7313ab463d10f2e797b3d6463ed;p=gcc.git New test case From-SVN: r28693 --- diff --git a/gcc/testsuite/g++.old-deja/g++.martin/eval1.c b/gcc/testsuite/g++.old-deja/g++.martin/eval1.c new file mode 100644 index 00000000000..e8a19f6296c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.martin/eval1.c @@ -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; +}