Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 1 | /* { dg-do compile } */ |
Christophe Lyon | 30f1f97 | 2019-11-05 13:18:36 +0000 | [diff] [blame] | 2 | /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ |
Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 3 | /* { dg-options "-g -fPIC" } */ |
Joel Brobecker | 36c08a8 | 2020-12-23 20:24:29 -0300 | [diff] [blame] | 4 | /* { dg-require-effective-target fpic } */ |
Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 5 | |
| 6 | void *v; |
| 7 | void a (void *x) { } |
| 8 | void b (void) { } |
Joel Brobecker | 36c08a8 | 2020-12-23 20:24:29 -0300 | [diff] [blame] | 9 | /* line 9. */ |
| 10 | int /* line 10. */ |
| 11 | main (int argc) /* line 11. */ |
| 12 | { /* line 12. */ |
| 13 | if (argc == 12345) /* line 13. */ |
Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 14 | { |
| 15 | a (v); |
| 16 | return 1; |
| 17 | } |
| 18 | b (); |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | |
James Greenhalgh | 18b2797 | 2017-10-26 14:17:40 +0000 | [diff] [blame] | 23 | /* { dg-final { scan-assembler-not "\.loc 1 9 \[0-9\]\+" } } */ |
Christophe Lyon | 30f1f97 | 2019-11-05 13:18:36 +0000 | [diff] [blame] | 24 | /* { dg-final { scan-assembler-not "\.loc 1 10 \[0-9\]\+" } } */ |
Joel Brobecker | 36c08a8 | 2020-12-23 20:24:29 -0300 | [diff] [blame] | 25 | /* { dg-final { scan-assembler-not "\.loc 1 11 \[0-9\]\+" } } */ |
Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 26 | |
| 27 | /* The loc at the start of the prologue. */ |
Joel Brobecker | 36c08a8 | 2020-12-23 20:24:29 -0300 | [diff] [blame] | 28 | /* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ |
Tom de Vries | e40191f | 2013-10-27 23:36:51 +0000 | [diff] [blame] | 29 | |
| 30 | /* The loc at the end of the prologue, with the first user line. */ |
Joel Brobecker | 36c08a8 | 2020-12-23 20:24:29 -0300 | [diff] [blame] | 31 | /* { dg-final { scan-assembler-times "\.loc 1 13 \[0-9\]\+" 1 } } */ |