Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wunused-label-2.C
bloba53fdedf317259b1bdbd19b3df075bf62b98087d
1 // { dg-do compile }
2 // { dg-options "-Wunused" }
4 // If __attribute__ ((unused)) follows a label and precedes a
5 // declaration, we should get a warning for the label, not the
6 // declaration.
8 void
9 f1()
11   int i1;                               // { dg-warning "unused variable" }
12  l1: __attribute__ ((unused)) int i2;   // { dg-warning "label \[^\n\]* not used" }