1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fgimple -fdump-tree-ivopts" } */ 3 4 typedef struct { 5 int x; 6 int y; 7 } S; 8 9 int *a_p; 10 S a[1000]; 11 12 void __GIMPLE (startwith ("loop")) f(int k)13f (int k) 14 { 15 int i; 16 int * _1; 17 18 bb_2: 19 i_5 = k_4(D); 20 if (i_5 <= 999) 21 goto bb_4; 22 else 23 goto bb_3; 24 25 bb_3: 26 return; 27 28 bb_4: 29 ; 30 31 bb_5: 32 i_12 = __PHI (bb_6: i_9, bb_4: i_5); 33 _1 = &a[i_12].y; 34 a_p = _1; 35 __MEM <S[1000]> ((int *)&a)[i_12].y = 100; 36 i_9 = i_5 + i_12; 37 if (i_9 <= 999) 38 goto bb_6; 39 else 40 goto bb_3; 41 42 bb_6: 43 ; 44 goto bb_5; 45 46 } 47 48 /* { dg-final { scan-tree-dump-times "&a" 1 "ivopts" } } */ 49