1 /* N3355 - Named loops. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=gnu99" } */
9 for (int i
= 0; i
< 16; ++i
)
11 for (int j
= 0; j
< 16; ++j
)
12 break label2
; /* { dg-error "'break' statement operand 'label2' does not refer to a named loop or 'switch'; did you mean 'label1'\\\?" } */
13 for (int i
= 0; i
< 16; ++i
)
14 break label3
; /* { dg-error "'break' statement operand 'label3' does not refer to a named loop or 'switch'" } */
15 label4
: /* { dg-message "'switch' name defined here" } */
19 for (int i
= 0; i
< 16; ++i
)
20 continue label5
; /* { dg-error "'continue' statement operand 'label5' does not refer to a named loop" } */
23 for (int i
= 0; i
< 16; ++i
)
24 continue label4
; /* { dg-error "'continue' statement operand 'label4' refers to a named 'switch'" } */
27 for (int i
= 0; i
< 16; ++i
)
28 continue label7
; /* { dg-error "'continue' statement operand 'label7' does not refer to a named loop; did you mean 'label6'\\\?" } */
30 for (int i
= 0; i
< 16; ++i
)
33 for (int i
= 0; i
< 16; ++i
)
34 break label8
; /* { dg-error "'break' statement operand 'label8' does not refer to a named loop or 'switch'" } */
36 for (int i
= 0; i
< 16; ++i
)
37 continue label9
; /* { dg-error "'continue' statement operand 'label9' does not refer to a named loop" } */
43 break label10
; /* { dg-error "'break' statement operand 'label10' does not refer to a named loop or 'switch'" } */