Commit f739dae7 authored by Rémy Oudompheng's avatar Rémy Oudompheng

cmd/gc: mark OGOTO as a statement for formatters.

Nodes of goto statements were corrupted when written
to export data.

Fixes #7023.

R=rsc, dave, minux.ma
CC=golang-codereviews
https://golang.org/cl/46190043
parent 8449863d
......@@ -1039,6 +1039,7 @@ static int opprec[] = {
[OEMPTY] = -1,
[OFALL] = -1,
[OFOR] = -1,
[OGOTO] = -1,
[OIF] = -1,
[OLABEL] = -1,
[OPROC] = -1,
......
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package a
func Foo() {
goto bar
bar:
}
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package b
import (
"./a"
)
var f = a.Foo
// compiledir
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 7023: corrupted export data when an inlined function
// contains a goto.
package ignored
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment