Replace absolute line numbers in c-c++-common
[official-gcc.git] / gcc / testsuite / c-c++-common / pr43395.c
blobf672c8c1994d681d6ad148552b930c8eb24f30a0
1 /* PR c/43395 */
2 /* { dg-do compile } */
4 void *
5 foo (void)
7 lab: /* { dg-line foo_lab } */
8 return &&lab;
9 /* { dg-warning "function returns address of label" "" { target c } .-1 } */
10 /* { dg-warning "address of label" "" { target c++ } foo_lab } */
13 void *
14 bar (void)
16 __label__ lab;
17 lab: /* { dg-line bar_lab } */
18 return &&lab;
19 /* { dg-warning "function returns address of label" "" { target c } .-1 } */
20 /* { dg-warning "address of label" "" { target c++ } bar_lab } */
23 void *
24 baz (void)
26 int i; /* { dg-line baz_i } */
27 return &i;
28 /* { dg-warning "function returns address of local variable" "" { target c } .-1 } */
29 /* { dg-warning "address of local variable" "" { target c++ } baz_i } */