Robert Griesemer | 5a27079 | 2009-03-16 11:21:58 -0700 | [diff] [blame] | 1 | // $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 | |
| 7 | package main |
| 8 | |
| 9 | func main() { |
Russ Cox | e72156b | 2011-03-15 14:05:07 -0400 | [diff] [blame] | 10 | if true { |
| 11 | } else { |
| 12 | L1: |
Russ Cox | 21e75da | 2011-06-17 06:07:13 -0400 | [diff] [blame^] | 13 | goto L1 |
Russ Cox | e72156b | 2011-03-15 14:05:07 -0400 | [diff] [blame] | 14 | } |
| 15 | if true { |
| 16 | } else { |
Russ Cox | 21e75da | 2011-06-17 06:07:13 -0400 | [diff] [blame^] | 17 | goto L2 |
Russ Cox | e72156b | 2011-03-15 14:05:07 -0400 | [diff] [blame] | 18 | L2: |
| 19 | main() |
| 20 | } |
Robert Griesemer | 5a27079 | 2009-03-16 11:21:58 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | /* |
| 24 | These should be legal according to the spec. |
Ian Lance Taylor | 1e39143 | 2009-03-16 21:47:38 -0700 | [diff] [blame] | 25 | bug140.go:6: syntax error near L1 |
| 26 | bug140.go:7: syntax error near L2 |
Robert Griesemer | 5a27079 | 2009-03-16 11:21:58 -0700 | [diff] [blame] | 27 | */ |