Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / c11-labels-2.c
blobe9b492446b5ff5aaf2a94a83fd0e258f2151c619
1 /* Tests for labels before declarations and at ends of compound statements. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic" } */
5 int f(int x)
6 {
7 goto b;
8 a: int i = 2 * x; /* { dg-warning "a label can only be part of a statement and a declaration is not a statement" } */
9 goto c;
10 b: goto a;
11 { i *= 3; c: } /* { dg-warning "label at end of compound statement" } */
12 return i;
13 d: /* { dg-warning "label at end of compound statement" } */