* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
[official-gcc.git] / gcc / testsuite / c-c++-common / pr43395.c
blobd060ae2a9689426afc596d55f6d2b1bda8ac4cdb
1 /* PR c/43395 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target label_values } */
5 void *
6 foo (void)
8 lab: /* { dg-line foo_lab } */
9 return &&lab;
10 /* { dg-warning "function returns address of label" "" { target c } .-1 } */
11 /* { dg-warning "address of label" "" { target c++ } foo_lab } */
14 void *
15 bar (void)
17 __label__ lab;
18 lab: /* { dg-line bar_lab } */
19 return &&lab;
20 /* { dg-warning "function returns address of label" "" { target c } .-1 } */
21 /* { dg-warning "address of label" "" { target c++ } bar_lab } */
24 void *
25 baz (void)
27 int i; /* { dg-line baz_i } */
28 return &i;
29 /* { dg-warning "function returns address of local variable" "" { target c } .-1 } */
30 /* { dg-warning "address of local variable" "" { target c++ } baz_i } */