Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-ssa/slsr-40.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Verify straight-line strength reduction for array subscripting. elems[n-1] is reduced to elems + n * 4 + 0xffffffff * 4, only when pointers are of the same size as that of int (assuming 4 bytes). */ /* { dg-do run } */ /* { dg-options "-O2" } */ struct data { unsigned long elms[1]; } gData; void __attribute__((noinline)) foo (struct data *dst, unsigned int n) { dst->elms[n - 1] &= 1; } int main () { foo (&gData, 1); return 0; }