]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr21171.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr21171.c
1 /* PR 21171. Ivopts should not rewrite references to volatile memory. */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -fdump-tree-optimized" } */
4
5 typedef unsigned int u_int32_t;
6 typedef unsigned char u_int8_t;
7
8 #define AIC_VECTORS 32
9
10 typedef volatile struct AT91RM9200_regs {
11 u_int32_t SVR[AIC_VECTORS];
12 } AT91RM9200_regs_t;
13
14 #define CPUReg ((AT91RM9200_regs_t*)0xFFF00000)
15
16 extern const u_int32_t __IntTable[AIC_VECTORS];
17
18 int main()
19 {
20 int c;
21
22 for (c = 0; c < AIC_VECTORS; c++)
23 CPUReg->SVR[c] = __IntTable[c];
24
25 return 0;
26 }
27
28 /* { dg-final { scan-tree-dump-times "SVR" 1 "optimized"} } */