1 /* { dg-do compile { target *-*-linux* } } */
2 /* { dg-options "-O2 -fpic -fno-plt" } */
3 
4 extern char* bar (int);
5 extern char* arr[32];
6 
7 void
foo(void)8 foo (void)
9 {
10   int i;
11 
12   for (i = 0; i < 32; i++)
13     arr[i] = bar (128);
14 }
15 
16 /* { dg-final { scan-assembler "call\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */
17 /* { dg-final { scan-assembler "call\[ \t\]*.bar@GOT\\(" { target ia32 } } } */
18 /* { dg-final { scan-assembler-not "mov(l|q)\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */
19 /* { dg-final { scan-assembler-not "movl\[ \t\]*.bar@GOT\\(" { target ia32 } } } */
20 /* { dg-final { scan-assembler-not "call\[ \t\]*.bar@PLT" } } */
21