From 9a4f923cb8794a81075f88dad401136cee5c1eae Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 14 Oct 2013 21:24:30 +0000 Subject: Update Go testsuite to a copy of the Go 1.1.2 testsuite. * go.test/go-test.exp (go-find-packages): New proc. (go-gc-tests): Skip stress and safe tests. Skip *.dir subdirectories. Do simple +build line matching. Handle run with arguments. Handle errorcheckdir and rundircmpout. Use packages for rundir. Remove special handling for bug191 and dwarf. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203578 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/go.test/test/fixedbugs/issue5244.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/go.test/test/fixedbugs/issue5244.go (limited to 'gcc/testsuite/go.test/test/fixedbugs/issue5244.go') diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5244.go b/gcc/testsuite/go.test/test/fixedbugs/issue5244.go new file mode 100644 index 00000000000..e26c7b8c45e --- /dev/null +++ b/gcc/testsuite/go.test/test/fixedbugs/issue5244.go @@ -0,0 +1,18 @@ +// run + +// Copyright 2013 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 5244: the init order computation uses the wrong +// order for top-level blank identifier assignments. +// The example used to panic because it tries calling a +// nil function instead of assigning to f before. + +package main + +var f = func() int { return 1 } +var _ = f() + g() +var g = func() int { return 2 } + +func main() {} -- cgit v1.2.1