]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr99578-1.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr99578-1.c
1 /* PR middle-end/99578 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not "&MEM" "optimized" } } */
5 /* { dg-final { scan-tree-dump-times "PHI <-?1\\\(\[0-9\]+\\\), -?1\\\(\[0-9\]+\\\)>" 2 "optimized" } } */
6
7 struct S { int a, b[4]; };
8 struct T { int a, b[8192], c[4]; };
9
10 int
11 foo (struct S *p)
12 {
13 if (p) return -1;
14 return p->b == (void *)4;
15 }
16
17 int
18 bar (struct T *p)
19 {
20 if (p) return -1;
21 return p->c == (void *)32772;
22 }