]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr59940.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr59940.c
CommitLineData
68fca595
MP
1/* PR c/59940 */
2/* { dg-do compile } */
3/* { dg-options "-Wconversion -Woverflow" } */
4
5int f (unsigned int);
8ece1ab3 6typedef int sitype __attribute__((mode(SI)));
68fca595
MP
7
8int
9g (void)
10{
27f083b8 11 sitype si = 12;
68fca595
MP
12 unsigned int ui = -1; /* { dg-warning "21:negative integer implicitly converted to unsigned type" } */
13 unsigned char uc;
14 ui = si; /* { dg-warning "8:conversion" } */
15 si = 0x80000000; /* { dg-warning "8:conversion of unsigned constant value to negative integer" } */
16 si = 3.2f; /* { dg-warning "8:conversion" } */
17 uc = 256; /* { dg-warning "8:large integer implicitly truncated to unsigned type" } */
18 si = 0x800000000; /* { dg-warning "8:overflow in implicit constant conversion" } */
81e5eca8
MP
19 return f (si) /* { dg-warning "13:conversion" } */
20 + f (si); /* { dg-warning "15:conversion" } */
68fca595
MP
21}
22
23int
24y (void)
25{
81e5eca8
MP
26 f (); /* { dg-error "3:too few arguments to function" } */
27 g (0xa); /* { dg-error "3:too many arguments to function" } */
68fca595 28}