gcc/testsuite/gcc.dg/tree-ssa/scev-11.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-ivopts-details" } */ |
| 3 | |
| 4 | int a[128]; |
| 5 | extern int b[]; |
| 6 | |
| 7 | int bar (int *); |
| 8 | |
| 9 | int |
| 10 | foo (int n) |
| 11 | { |
| 12 | int i; |
| 13 | |
| 14 | for (i = 0; i < n; i++) |
| 15 | { |
| 16 | unsigned char uc = (unsigned char)i; |
| 17 | a[i] = i; |
| 18 | b[uc] = 1; |
| 19 | } |
| 20 | |
| 21 | bar (a); |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | /* Address of array reference to b is scev. */ |
| 26 | /* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 2 "ivopts" } } */ |