New test case
authorMartin v. Löwis <loewis@gcc.gnu.org>
Fri, 13 Aug 1999 07:25:31 +0000 (07:25 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Fri, 13 Aug 1999 07:25:31 +0000 (07:25 +0000)
From-SVN: r28693

gcc/testsuite/g++.old-deja/g++.martin/eval1.c [new file with mode: 0644]

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 (file)
index 0000000..e8a19f6
--- /dev/null
@@ -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;
+}