aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/addr-sel-1.c
blob: 27623ffd96cc5237a4b91efec2c602ed34902cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR rtl-optimization/28940 */
/* Origin: Lev Makhlis <lmakhlis@bmc.com> */

/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
/* { dg-require-effective-target nonpic } */
/* { dg-options "-O2 -mtune=i686" } */

char a[10], b[10];

int f(int i)
{
  return a[i+1] + b[i+1];
}

/* { dg-final { scan-assembler "a\\+1" } } */
/* { dg-final { scan-assembler "b\\+1" } } */