1// run
2
3// Copyright 2012 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 4353. An optimizer bug in 8g triggers a runtime fault
8// instead of an out of bounds panic.
9
10package main
11
12var aib [100000]int
13var paib *[100000]int = &aib
14var i64 int64 = 100023
15
16func main() {
17	defer func() { recover() }()
18	_ = paib[i64]
19}
20