3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Verify that erroneous labels are caught by the compiler.
8 // This set is caught by pass 1.
16 L1: // ERROR "label .*L1.* defined and not used"
19 L2: // ERROR "label .*L2.* defined and not used"
21 L3: // ERROR "label .*L3.* defined and not used"
24 L4: // ERROR "label .*L4.* defined and not used"
27 L5: // ERROR "label .*L5.* defined and not used"
29 L6: // GCCGO_ERROR "previous"
31 L6: // ERROR "label .*L6.* already defined"
53 defalt: // ERROR "label .*defalt.* defined and not used"
64 goto go2 // ERROR "label go2 not defined|reference to undefined label .*go2"