Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.c-torture/execute/pr40747.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR middle-end/40747 */ |
2 | |
3 extern void abort (void); | |
4 | |
5 int | |
6 foo (int i) | |
7 { | |
8 return (i < 4 && i >= 0) ? i : 4; | |
9 } | |
10 | |
11 int | |
12 main () | |
13 { | |
14 if (foo (-1) != 4) abort (); | |
15 if (foo (0) != 0) abort (); | |
16 if (foo (1) != 1) abort (); | |
17 if (foo (2) != 2) abort (); | |
18 if (foo (3) != 3) abort (); | |
19 if (foo (4) != 4) abort (); | |
20 if (foo (5) != 4) abort (); | |
21 return 0; | |
22 } |