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