summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c
blob: e86aa8a5d2f0d891811c001dc5980596423c842c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-options "-O2 -mavoid-indexed-addresses -mno-altivec -mno-vsx" } */

/* { dg-final { scan-assembler-not "lbzx" } }

/* Ensure that an indexed load is not generated with
   -mavoid-indexed-addresses. */

char
do_one (char *base, unsigned long offset)
{
  return base[offset];
}