summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/foldconst-5.c
blob: 1dad931ed7b4d307502a51cc18c9dd327a720d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-ccp1" } */


static const char a[5]="t";
static const int b[5]={1,2};
static const struct a {int a : 6; int b : 6;} c = {5,9};
test()
{
  return a[2]+b[1]+b[3]+c.b;
}
/* { dg-final { scan-tree-dump "return 11;" "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */