Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/pr69764.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR rtl-optimization/69764 */ | |
2 /* { dg-do compile { target int32plus } } */ | |
3 | |
4 unsigned char | |
5 fn1 (unsigned char a) | |
6 { | |
7 return a >> ~6; /* { dg-warning "right shift count is negative" } */ | |
8 } | |
9 | |
10 unsigned short | |
11 fn2 (unsigned short a) | |
12 { | |
13 return a >> ~6; /* { dg-warning "right shift count is negative" } */ | |
14 } | |
15 | |
16 unsigned int | |
17 fn3 (unsigned int a) | |
18 { | |
19 return a >> ~6; /* { dg-warning "right shift count is negative" } */ | |
20 } | |
21 | |
22 unsigned char | |
23 fn4 (unsigned char a) | |
24 { | |
25 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ | |
26 } | |
27 | |
28 unsigned short | |
29 fn5 (unsigned short a) | |
30 { | |
31 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ | |
32 } | |
33 | |
34 unsigned int | |
35 fn6 (unsigned int a) | |
36 { | |
37 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ | |
38 } |