1 /* Test for proper errors for break and continue in nested functions. */
2 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
10 void bar1 (void) { break; } /* { dg-error "break statement" "break switch 1" } */
15 void bar2 (void) { break; } /* { dg-error "break statement" "break switch 2" } */
18 void bar3 (void) { break; } /* { dg-error "break statement" "break while" } */
21 void bar4 (void) { break; } /* { dg-error "break statement" "break do" } */
24 void bar5 (void) { break; } /* { dg-error "break statement" "break for" } */
27 void bar6 (void) { continue; } /* { dg-error "continue statement" "continue while" } */
30 void bar7 (void) { continue; } /* { dg-error "continue statement" "continue do" } */
33 void bar8 (void) { continue; } /* { dg-error "continue statement" "continue for" } */