Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/20030323-1.c @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do run } */ |
2 | |
3 /* PR c/8224 */ | |
4 /* Contributed by Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> */ | |
5 | |
6 extern void abort (void); | |
7 | |
8 unsigned f (int x) | |
9 { | |
10 return (unsigned) (x / 2) / 2; | |
11 } | |
12 | |
13 unsigned f1 (int x) | |
14 { | |
15 unsigned xx = x / 2; | |
16 return xx / 2; | |
17 } | |
18 | |
19 int main () | |
20 { | |
21 if (f1 (-5) != f (-5)) | |
22 abort (); | |
23 return 0; | |
24 } |