Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-bitand-4.c
blobacb0ce9af9b9c70118d0aee6f9090934de464f04
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-original" } */
3 /* { dg-options "-fdump-tree-original -fno-common" { target hppa*-*-hpux* } } */
5 typedef char char4[4] __attribute__ ((aligned (4)));
6 char4 c4[4] __attribute__ ((aligned (16)));
8 typedef char char16[16] __attribute__ ((aligned (16)));
9 char16 c16[4] __attribute__ ((aligned (4)));
11 int f1 (void)
13 /* 12 */
14 return 15 & (__SIZE_TYPE__)&c4[3];
17 int f2 (int i)
19 /* Indeterminate */
20 return 15 & (__SIZE_TYPE__)&c4[i];
23 int f3 (int i)
25 /* 0 */
26 return 3 & (__SIZE_TYPE__)&c4[i];
29 int f4 (int i)
31 /* Indeterminate */
32 return 7 & (__SIZE_TYPE__)&c16[i];
35 int f5 (int i)
37 /* 0 */
38 return 3 & (__SIZE_TYPE__)&c16[i];
41 /* { dg-final { scan-tree-dump-times "return 12" 1 "original" } } */
42 /* { dg-final { scan-tree-dump-times "\& 15" 1 "original" } } */
43 /* { dg-final { scan-tree-dump-times "return 0" 2 "original" } } */
44 /* { dg-final { scan-tree-dump-times "\& 7" 1 "original" } } */
45 /* { dg-final { cleanup-tree-dump "original" } } */