annotate gcc/testsuite/c-c++-common/Wshift-overflow-6.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c++/55095 */
kono
parents:
diff changeset
2 /* { dg-do compile { target int32 } } */
kono
parents:
diff changeset
3 /* { dg-options "-Wshift-overflow=1" } */
kono
parents:
diff changeset
4 /* { dg-additional-options "-std=c++11" { target c++ } } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 int i00 = 0b1 << 31;
kono
parents:
diff changeset
7 int i01 = 0b10 << 30;
kono
parents:
diff changeset
8 int i02 = 0b100 << 29;
kono
parents:
diff changeset
9 int i03 = 0b1000 << 28;
kono
parents:
diff changeset
10 int i04 = 0b10000 << 27;
kono
parents:
diff changeset
11 int i05 = 0b100000 << 26;
kono
parents:
diff changeset
12 int i06 = 0b1000000 << 25;
kono
parents:
diff changeset
13 int i07 = 0b10000000 << 24;
kono
parents:
diff changeset
14 int i08 = 0b100000000 << 23;
kono
parents:
diff changeset
15 int i09 = 0b1000000000 << 22;
kono
parents:
diff changeset
16 int i10 = 0b10000000000 << 21;
kono
parents:
diff changeset
17 int i11 = 0b100000000000 << 20;
kono
parents:
diff changeset
18 int i12 = 0b1000000000000 << 19;
kono
parents:
diff changeset
19 int i13 = 0b10000000000000 << 18;
kono
parents:
diff changeset
20 int i14 = 0b100000000000000 << 17;
kono
parents:
diff changeset
21 int i15 = 0b1000000000000000 << 16;
kono
parents:
diff changeset
22 int i16 = 0b10000000000000000 << 15;
kono
parents:
diff changeset
23 int i17 = 0b100000000000000000 << 14;
kono
parents:
diff changeset
24 int i18 = 0b1000000000000000000 << 13;
kono
parents:
diff changeset
25 int i19 = 0b10000000000000000000 << 12;
kono
parents:
diff changeset
26 int i20 = 0b100000000000000000000 << 11;
kono
parents:
diff changeset
27 int i21 = 0b1000000000000000000000 << 10;
kono
parents:
diff changeset
28 int i22 = 0b10000000000000000000000 << 9;
kono
parents:
diff changeset
29 int i23 = 0b100000000000000000000000 << 8;
kono
parents:
diff changeset
30 int i24 = 0b1000000000000000000000000 << 7;
kono
parents:
diff changeset
31 int i25 = 0b10000000000000000000000000 << 6;
kono
parents:
diff changeset
32 int i26 = 0b100000000000000000000000000 << 5;
kono
parents:
diff changeset
33 int i27 = 0b1000000000000000000000000000 << 4;
kono
parents:
diff changeset
34 int i28 = 0b10000000000000000000000000000 << 3;
kono
parents:
diff changeset
35 int i29 = 0b100000000000000000000000000000 << 2;
kono
parents:
diff changeset
36 int i30 = 0b1000000000000000000000000000000 << 1;
kono
parents:
diff changeset
37 int i31 = (int) 0b10000000000000000000000000000000u << 1; /* { dg-warning "requires 33 bits to represent" } */