Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/overflow-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O -fdump-tree-optimized" } */ | |
3 | |
4 #if __SIZEOF_INT__ < 4 | |
5 __extension__ typedef __UINT32_TYPE__ uint32_t; | |
6 #else | |
7 typedef unsigned uint32_t; | |
8 #endif | |
9 | |
10 int f(uint32_t a){ | |
11 uint32_t b=5; | |
12 uint32_t c=a-b; | |
13 return c>a; | |
14 } | |
15 int g(uint32_t a){ | |
16 uint32_t b=32; | |
17 uint32_t c=a+b; | |
18 return c<a; | |
19 } | |
20 | |
21 /* { dg-final { scan-tree-dump "a_\[0-9\]+.D. <= 4;" "optimized" } } */ | |
22 /* { dg-final { scan-tree-dump "a_\[0-9\]+.D. > 4294967263;" "optimized" } } */ |