OSDN Git Service

PR go/50656
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / go.test / test / cmplx.go
1 // errchk $G -e $D/$F.go
2
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.
6
7 package main
8
9 var (
10         f32 float32
11         f64 float64
12
13         c64  complex64
14         c128 complex128
15 )
16
17 func main() {
18         // ok
19         c64 = complex(f32, f32)
20         c128 = complex(f64, f64)
21
22         _ = complex128(0)     // ok
23         _ = complex(f32, f64) // ERROR "complex"
24         _ = complex(f64, f32) // ERROR "complex"
25 }