comparison gcc/testsuite/gcc.dg/pr56890-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR target/56890 */
2 /* Reported by Rainer Jung <rainer.jung@kippdata.de> */
3
4 /* { dg-do assemble } */
5 /* { dg-options "-O2" } */
6
7 unsigned int buggy(unsigned int min, unsigned int max)
8 {
9 if (max < 16384) {
10 unsigned short num16 = 0;
11 num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
12 return num16;
13 }
14 return 0;
15 }