* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / testsuite / go.go-torture / execute / map-1.go
blob2054c6c413b6315390e53d89c8b9c183bfc6c08e
1 package main
3 func main() {
4 v := make(map[int] int);
5 v[0] = 0;
6 v[1000000] = 1;
7 if v[0] != 0 {
8 panic(1)
10 val, present := v[0];
11 if !present || val != 0 {
12 panic(2)
14 val = 5;
15 val, present = v[1];
16 if present || val != 0 {
17 panic(3);
19 if v[2] != 0 {
20 panic(4)
22 val, present = v[2];
23 if present {
24 panic(5)
26 if len(v) != 2 {
27 panic(6)
29 delete(v, 0)
30 if len(v) != 1 {
31 panic(7)
34 w := make(map[string] string);
35 if len(w) != 0 {
36 panic(8)
38 w["Hello"] = "world";
39 w["Goodbye"] = "sweet prince";
40 if w["Hello"] != "world" {
41 panic(9)
43 if w["Hej"] != "" {
44 panic(10)