Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-bitand-1.c
blobf490b153b2d73c6ea5708de0ecf6d6eac9c8f0b7
1 /* { dg-do compile } */
2 /* { dg-options "-w -fdump-tree-original" } */
4 char c1 __attribute__ ((aligned (1)));
5 char c2 __attribute__ ((aligned (2)));
6 char c4 __attribute__ ((aligned (4)));
7 char c8 __attribute__ ((aligned (8)));
8 unsigned f1(void)
10 return 3 & (__SIZE_TYPE__)&c1;
13 unsigned f2(void)
15 return 3 & (__SIZE_TYPE__)&c2;
18 unsigned f3(void)
20 return 3 & (__SIZE_TYPE__)&c4;
23 unsigned f4(void)
25 return 3 & (__SIZE_TYPE__)&c8;
28 /* { dg-final { scan-tree-dump-times "\&c1 \& 3" 1 "original" } } */
29 /* { dg-final { scan-tree-dump-times "\&c2 \& 3" 1 "original" } } */
30 /* { dg-final { scan-tree-dump-times "\&c4 \& 3" 0 "original" } } */
31 /* { dg-final { scan-tree-dump-times "\&c8 \& 3" 0 "original" } } */
32 /* { dg-final { scan-tree-dump-times "return 0" 2 "original" } } */
33 /* { dg-final { cleanup-tree-dump "original" } } */