[gcc/devel/omp/gcc-10] go.test: update issue4085b.go to version from Go 1.13
Tobias Burnus
burnus@gcc.gnu.org
Mon Jun 15 15:52:32 GMT 2020
https://gcc.gnu.org/g:703f9d8687ecbd86cd88ec0bf16088bb9e36303e
commit 703f9d8687ecbd86cd88ec0bf16088bb9e36303e
Author: Ian Lance Taylor <iant@golang.org>
Date: Fri Jun 12 14:00:11 2020 -0700
go.test: update issue4085b.go to version from Go 1.13
This lets the test pass on AIX.
Not updating to master because we get slightly different error messages,
so that is a more complex change.
Diff:
---
gcc/testsuite/go.test/test/fixedbugs/issue4085b.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go
index 6bf315fcc2f..6304ce073aa 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go
@@ -21,9 +21,11 @@ func main() {
shouldPanic("cap out of range", func() { _ = make(T, 0, int64(n)) })
var t *byte
if unsafe.Sizeof(t) == 8 {
- var n2 int64 = 1 << 50
+ // Test mem > maxAlloc
+ var n2 int64 = 1 << 59
shouldPanic("len out of range", func() { _ = make(T, int(n2)) })
shouldPanic("cap out of range", func() { _ = make(T, 0, int(n2)) })
+ // Test elem.size*cap overflow
n2 = 1<<63 - 1
shouldPanic("len out of range", func() { _ = make(T, int(n2)) })
shouldPanic("cap out of range", func() { _ = make(T, 0, int(n2)) })
More information about the Gcc-cvs
mailing list