Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr39867.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 link } */ |
2 /* { dg-options "-O2" } */ | |
3 | |
4 extern void link_error (void); | |
5 | |
6 int main (void) | |
7 { | |
8 int exp = -1; | |
9 /* Wrong folding of the LHS to an unsigned MAX leads to 4294967295 != 2. */ | |
10 if ((exp < 2 ? 2U : (unsigned int) exp) != 2) | |
11 link_error (); | |
12 return 0; | |
13 } | |
14 |