blob: 9c532f3ed4d3003f1b92b17e320192f3e5017bbd [file] [log] [blame]
Tom de Vriese40191f2013-10-27 23:36:51 +00001/* { dg-do compile } */
Christophe Lyon30f1f972019-11-05 13:18:36 +00002/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */
Tom de Vriese40191f2013-10-27 23:36:51 +00003/* { dg-options "-g -fPIC" } */
Joel Brobecker36c08a82020-12-23 20:24:29 -03004/* { dg-require-effective-target fpic } */
Tom de Vriese40191f2013-10-27 23:36:51 +00005
6void *v;
7void a (void *x) { }
8void b (void) { }
Joel Brobecker36c08a82020-12-23 20:24:29 -03009 /* line 9. */
10int /* line 10. */
11main (int argc) /* line 11. */
12{ /* line 12. */
13 if (argc == 12345) /* line 13. */
Tom de Vriese40191f2013-10-27 23:36:51 +000014 {
15 a (v);
16 return 1;
17 }
18 b ();
19
20 return 0;
21}
22
James Greenhalgh18b27972017-10-26 14:17:40 +000023/* { dg-final { scan-assembler-not "\.loc 1 9 \[0-9\]\+" } } */
Christophe Lyon30f1f972019-11-05 13:18:36 +000024/* { dg-final { scan-assembler-not "\.loc 1 10 \[0-9\]\+" } } */
Joel Brobecker36c08a82020-12-23 20:24:29 -030025/* { dg-final { scan-assembler-not "\.loc 1 11 \[0-9\]\+" } } */
Tom de Vriese40191f2013-10-27 23:36:51 +000026
27/* The loc at the start of the prologue. */
Joel Brobecker36c08a82020-12-23 20:24:29 -030028/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */
Tom de Vriese40191f2013-10-27 23:36:51 +000029
30/* The loc at the end of the prologue, with the first user line. */
Joel Brobecker36c08a82020-12-23 20:24:29 -030031/* { dg-final { scan-assembler-times "\.loc 1 13 \[0-9\]\+" 1 } } */