Skip to content

Commit f61fa11

Browse files
committed
test: add a test for gccgo bug #32347
The gccgo compiler crashes with int-to-string conversion with large integer constant operand. CL 179777 is the fix. This CL adds a test. Updates #32347. Change-Id: Id1d9dbbcdd3addca4636f1b9c5fdbc450cc48c1d Reviewed-on: https://go-review.googlesource.com/c/go/+/179797 Run-TryBot: Cherry Zhang <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 4c05525 commit f61fa11

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/fixedbugs/issue32347.go

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// compile
2+
3+
// Copyright 2019 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+
// Issue 32347: gccgo compiler crashes with int-to-string conversion
8+
// with large integer constant operand.
9+
10+
package p
11+
12+
const (
13+
X1 = string(128049)
14+
X2 = string(-1)
15+
X3 = string(1<<48)
16+
)
17+
18+
var S1, S2, S3 = X1, X2, X3

0 commit comments

Comments
 (0)