diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-06-12 14:00:11 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-06-12 14:00:11 -0700 |
commit | 309a6c468f394cf93837f5b3dcfb975206a98b92 (patch) | |
tree | 0f1b7814b8fd5adae27e3e0dfc4ba129e1ffe2b8 /gcc/testsuite/go.test/test | |
parent | 06712fc68dc9843d9af7c7ac10047f49d305ad76 (diff) | |
download | gcc-309a6c468f394cf93837f5b3dcfb975206a98b92.zip gcc-309a6c468f394cf93837f5b3dcfb975206a98b92.tar.gz gcc-309a6c468f394cf93837f5b3dcfb975206a98b92.tar.bz2 |
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.
Diffstat (limited to 'gcc/testsuite/go.test/test')
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/issue4085b.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go index 6bf315f..6304ce0 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)) }) |