Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr68317.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O2" } */ | |
3 | |
4 void bar (int); | |
5 | |
6 void | |
7 foo () | |
8 { | |
9 int index = 0; | |
10 | |
11 for (index; index <= 10; index--) | |
12 /* Result of the following multiply will overflow | |
13 when converted to signed int. */ | |
145 | 14 bar ((0xcafe + index) * 0xdead); /* { dg-warning "iteration \[0-9\]+ invokes undefined behavior" } */ |
111 | 15 } |