Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / go.test / test / ken / cplx0.go
blob6e9bfd023d0ec04505701a4edb3c5c4278f572b2
1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2010 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.
7 package main
9 const (
10 R = 5
11 I = 6i
13 C1 = R + I // ADD(5,6)
16 func doprint(c complex) { println(c) }
18 func main() {
20 // constants
21 println(C1)
22 doprint(C1)
24 // variables
25 c1 := C1
26 println(c1)
27 doprint(c1)