blob: 441c57a4855dc56fd41d013247c69c3f002545e6 [file] [log] [blame]
Robert Griesemer5a270792009-03-16 11:21:58 -07001// $G $D/$F.go || echo BUG should compile
2
3// Copyright 2009 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.
6
7package main
8
9func main() {
Russ Coxe72156b2011-03-15 14:05:07 -040010 if true {
11 } else {
12 L1:
Russ Cox21e75da2011-06-17 06:07:13 -040013 goto L1
Russ Coxe72156b2011-03-15 14:05:07 -040014 }
15 if true {
16 } else {
Russ Cox21e75da2011-06-17 06:07:13 -040017 goto L2
Russ Coxe72156b2011-03-15 14:05:07 -040018 L2:
19 main()
20 }
Robert Griesemer5a270792009-03-16 11:21:58 -070021}
22
23/*
24These should be legal according to the spec.
Ian Lance Taylor1e391432009-03-16 21:47:38 -070025bug140.go:6: syntax error near L1
26bug140.go:7: syntax error near L2
Robert Griesemer5a270792009-03-16 11:21:58 -070027*/