2008-01-25 Douglas Gregor <doug.gregor@gmail.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / postincr-1.c
blob752cda40c2236010360debae4e2249737987d6b0
1 /* Simple test for proper postincrement semantics. */
2 /* { dg-do run } */
4 extern void abort (void);
6 int i;
7 int c;
8 int *f ()
10 ++c;
11 return &i;
14 int main ()
16 int r;
17 r = (*f())++;
18 if (!(r == 0 && i == 1 && c == 1))
19 abort ();
20 return 0;