summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr67215-2.c
blob: ebf2919078c4dab981a0ac1e046d4f4dd491f18a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fpic" } */

extern char* bar (int) __attribute__ ((noplt));
extern char* arr[32];

void
foo (void)
{
  int i;

  for (i = 0; i < 32; i++)
    arr[i] = bar (128);
}

/* { dg-final { scan-assembler "call\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler "call\[ \t\]*.bar@GOT\\(" { target ia32 } } } */
/* { dg-final { scan-assembler-not "mov(l|q)\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-not "movl\[ \t\]*.bar@GOT\\(" { target ia32 } } } */
/* { dg-final { scan-assembler-not "call\[ \t\]*.bar@PLT" } } */