Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/postincr-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Simple test for proper postincrement semantics. */ | |
2 /* { dg-do run } */ | |
3 | |
4 extern void abort (void); | |
5 | |
6 int i; | |
7 int c; | |
8 int *f () | |
9 { | |
10 ++c; | |
11 return &i; | |
12 } | |
13 | |
14 int main () | |
15 { | |
16 int r; | |
17 r = (*f())++; | |
18 if (!(r == 0 && i == 1 && c == 1)) | |
19 abort (); | |
20 return 0; | |
21 } |