OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [sinit.go] - Blame information for rev 700

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G -S $D/$F.go | egrep initdone >/dev/null && echo BUG sinit || true
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 p
8
 
9
// Should be no init func in the assembly.
10
// All these initializations should be done at link time.
11
 
12
type S struct{ a, b, c int }
13
type SS struct{ aa, bb, cc S }
14
type SA struct{ a, b, c [3]int }
15
type SC struct{ a, b, c []int }
16
 
17
var (
18
        zero                      = 2
19
        one                       = 1
20
        pi                        = 3.14
21
        slice                     = []byte{1, 2, 3}
22
        sliceInt                  = []int{1, 2, 3}
23
        hello                     = "hello, world"
24
        bytes                     = []byte("hello, world")
25
        four, five                = 4, 5
26
        x, y                      = 0.1, "hello"
27
        nilslice   []byte         = nil
28
        nilmap     map[string]int = nil
29
        nilfunc    func()         = nil
30
        nilchan    chan int       = nil
31
        nilptr     *byte          = nil
32
)
33
 
34
var a = [3]int{1001, 1002, 1003}
35
var s = S{1101, 1102, 1103}
36
var c = []int{1201, 1202, 1203}
37
 
38
var aa = [3][3]int{[3]int{2001, 2002, 2003}, [3]int{2004, 2005, 2006}, [3]int{2007, 2008, 2009}}
39
var as = [3]S{S{2101, 2102, 2103}, S{2104, 2105, 2106}, S{2107, 2108, 2109}}
40
var ac = [3][]int{[]int{2201, 2202, 2203}, []int{2204, 2205, 2206}, []int{2207, 2208, 2209}}
41
 
42
var sa = SA{[3]int{3001, 3002, 3003}, [3]int{3004, 3005, 3006}, [3]int{3007, 3008, 3009}}
43
var ss = SS{S{3101, 3102, 3103}, S{3104, 3105, 3106}, S{3107, 3108, 3109}}
44
var sc = SC{[]int{3201, 3202, 3203}, []int{3204, 3205, 3206}, []int{3207, 3208, 3209}}
45
 
46
var ca = [][3]int{[3]int{4001, 4002, 4003}, [3]int{4004, 4005, 4006}, [3]int{4007, 4008, 4009}}
47
var cs = []S{S{4101, 4102, 4103}, S{4104, 4105, 4106}, S{4107, 4108, 4109}}
48
var cc = [][]int{[]int{4201, 4202, 4203}, []int{4204, 4205, 4206}, []int{4207, 4208, 4209}}
49
 
50
var answers = [...]int{
51
        // s
52
        1101, 1102, 1103,
53
 
54
        // ss
55
        3101, 3102, 3103,
56
        3104, 3105, 3106,
57
        3107, 3108, 3109,
58
 
59
        // [0]
60
        1001, 1201, 1301,
61
        2101, 2102, 2103,
62
        4101, 4102, 4103,
63
        5101, 5102, 5103,
64
        3001, 3004, 3007,
65
        3201, 3204, 3207,
66
        3301, 3304, 3307,
67
 
68
        // [0][j]
69
        2001, 2201, 2301, 4001, 4201, 4301, 5001, 5201, 5301,
70
        2002, 2202, 2302, 4002, 4202, 4302, 5002, 5202, 5302,
71
        2003, 2203, 2303, 4003, 4203, 4303, 5003, 5203, 5303,
72
 
73
        // [1]
74
        1002, 1202, 1302,
75
        2104, 2105, 2106,
76
        4104, 4105, 4106,
77
        5104, 5105, 5106,
78
        3002, 3005, 3008,
79
        3202, 3205, 3208,
80
        3302, 3305, 3308,
81
 
82
        // [1][j]
83
        2004, 2204, 2304, 4004, 4204, 4304, 5004, 5204, 5304,
84
        2005, 2205, 2305, 4005, 4205, 4305, 5005, 5205, 5305,
85
        2006, 2206, 2306, 4006, 4206, 4306, 5006, 5206, 5306,
86
 
87
        // [2]
88
        1003, 1203, 1303,
89
        2107, 2108, 2109,
90
        4107, 4108, 4109,
91
        5107, 5108, 5109,
92
        3003, 3006, 3009,
93
        3203, 3206, 3209,
94
        3303, 3306, 3309,
95
 
96
        // [2][j]
97
        2007, 2207, 2307, 4007, 4207, 4307, 5007, 5207, 5307,
98
        2008, 2208, 2308, 4008, 4208, 4308, 5008, 5208, 5308,
99
        2009, 2209, 2309, 4009, 4209, 4309, 5009, 5209, 5309,
100
}
101
 
102
var (
103
        copy_zero = zero
104
        copy_one = one
105
        copy_pi = pi
106
        copy_slice = slice
107
        copy_sliceInt = sliceInt
108
        copy_hello = hello
109
        copy_bytes = bytes
110
        copy_four, copy_five = four, five
111
        copy_x, copy_y = x, y
112
        copy_nilslice = nilslice
113
        copy_nilmap = nilmap
114
        copy_nilfunc = nilfunc
115
        copy_nilchan = nilchan
116
        copy_nilptr = nilptr
117
)
118
 
119
var copy_a = a
120
var copy_s = s
121
var copy_c = c
122
 
123
var copy_aa = aa
124
var copy_as = as
125
var copy_ac = ac
126
 
127
var copy_sa = sa
128
var copy_ss = ss
129
var copy_sc = sc
130
 
131
var copy_ca = ca
132
var copy_cs = cs
133
var copy_cc = cc
134
 
135
var copy_answers = answers
136
 
137
var bx bool
138
var b0 = false
139
var b1 = true
140
 
141
var fx float32
142
var f0 = float32(0)
143
var f1 = float32(1)
144
 
145
var gx float64
146
var g0 = float64(0)
147
var g1 = float64(1)
148
 
149
var ix int
150
var i0 = 0
151
var i1 = 1
152
 
153
var jx uint
154
var j0 = uint(0)
155
var j1 = uint(1)
156
 
157
var cx complex64
158
var c0 = complex64(0)
159
var c1 = complex64(1)
160
 
161
var dx complex128
162
var d0 = complex128(0)
163
var d1 = complex128(1)
164
 
165
var sx []int
166
var s0 = []int{0, 0, 0}
167
var s1 = []int{1, 2, 3}
168
 
169
func fi() int
170
 
171
var ax [10]int
172
var a0 = [10]int{0, 0, 0}
173
var a1 = [10]int{1, 2, 3, 4}
174
 
175
type T struct{ X, Y int }
176
 
177
var tx T
178
var t0 = T{}
179
var t0a = T{0, 0}
180
var t0b = T{X: 0}
181
var t1 = T{X: 1, Y: 2}
182
var t1a = T{3, 4}
183
 
184
var psx *[]int
185
var ps0 = &[]int{0, 0, 0}
186
var ps1 = &[]int{1, 2, 3}
187
 
188
var pax *[10]int
189
var pa0 = &[10]int{0, 0, 0}
190
var pa1 = &[10]int{1, 2, 3}
191
 
192
var ptx *T
193
var pt0 = &T{}
194
var pt0a = &T{0, 0}
195
var pt0b = &T{X: 0}
196
var pt1 = &T{X: 1, Y: 2}
197
var pt1a = &T{3, 4}
198
 
199
var copy_bx = bx
200
var copy_b0 = b0
201
var copy_b1 = b1
202
 
203
var copy_fx = fx
204
var copy_f0 = f0
205
var copy_f1 = f1
206
 
207
var copy_gx = gx
208
var copy_g0 = g0
209
var copy_g1 = g1
210
 
211
var copy_ix = ix
212
var copy_i0 = i0
213
var copy_i1 = i1
214
 
215
var copy_jx = jx
216
var copy_j0 = j0
217
var copy_j1 = j1
218
 
219
var copy_cx = cx
220
var copy_c0 = c0
221
var copy_c1 = c1
222
 
223
var copy_dx = dx
224
var copy_d0 = d0
225
var copy_d1 = d1
226
 
227
var copy_sx = sx
228
var copy_s0 = s0
229
var copy_s1 = s1
230
 
231
var copy_ax = ax
232
var copy_a0 = a0
233
var copy_a1 = a1
234
 
235
var copy_tx = tx
236
var copy_t0 = t0
237
var copy_t0a = t0a
238
var copy_t0b = t0b
239
var copy_t1 = t1
240
var copy_t1a = t1a
241
 
242
var copy_psx = psx
243
var copy_ps0 = ps0
244
var copy_ps1 = ps1
245
 
246
var copy_pax = pax
247
var copy_pa0 = pa0
248
var copy_pa1 = pa1
249
 
250
var copy_ptx = ptx
251
var copy_pt0 = pt0
252
var copy_pt0a = pt0a
253
var copy_pt0b = pt0b
254
var copy_pt1 = pt1
255
var copy_pt1a = pt1a

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.