goto-label.c 304 B

123456789101112131415161718192021222324252627282930
  1. void foo(void)
  2. {
  3. goto a;
  4. a:
  5. a:
  6. return;
  7. }
  8. void g(void)
  9. {
  10. goto a;
  11. a:
  12. return;
  13. }
  14. void bar(void)
  15. {
  16. goto neverland;
  17. }
  18. /*
  19. * check-name: goto labels
  20. *
  21. * check-error-start
  22. goto-label.c:5:1: error: label 'a' redefined
  23. goto-label.c:18:9: error: label 'neverland' was not declared
  24. * check-error-end
  25. */