URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [assign.go] - Rev 700
Compare with Previous | Blame | View Log
// errchk $G -e $D/$F.go// Copyright 2009 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 mainimport "sync"type T struct {intsync.Mutex}func main() {{var x, y sync.Mutexx = y // ok_ = x}{var x, y Tx = y // ok_ = x}{var x, y [2]sync.Mutexx = y // ok_ = x}{var x, y [2]Tx = y // ok_ = x}{x := sync.Mutex{0, 0} // ERROR "assignment.*Mutex"_ = x}{x := sync.Mutex{key: 0} // ERROR "(unknown|assignment).*Mutex"_ = x}{x := &sync.Mutex{} // okvar y sync.Mutex // oky = *x // ok*x = y // ok_ = x_ = y}}
