aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c
blob: bd85e8640c24eeb35af0d55cdfa1a0670df0eebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do compile } */
/* { dg-options "-g -fPIC" } */

void *v;
void a (void *x) { }
void b (void) { }
                       /* line 7.  */
int                    /* line 8.  */
main (int argc)        /* line 9.  */
{                      /* line 10.  */
  if (argc == 12345)   /* line 11.  */
    {
      a (v);
      return 1;
    }
  b ();

  return 0;
}

/* { dg-final { scan-assembler-not "\.loc 1 7 0" } } */
/* { dg-final { scan-assembler-not "\.loc 1 8 0" } } */
/* { dg-final { scan-assembler-not "\.loc 1 9 0" } } */

/* The loc at the start of the prologue.  */
/* { dg-final { scan-assembler-times "\.loc 1 10 0" 1 } } */

/* The loc at the end of the prologue, with the first user line.  */
/* { dg-final { scan-assembler-times "\.loc 1 11 0" 1 } } */