1// run
2
3// Copyright 2011 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 1808
8
9package main
10
11func main() {
12	var i uint64
13	var x int = 12345
14
15	if y := x << (i&5); y != 12345<<0 {
16		println("BUG bug344", y)
17		return
18	}
19
20	i++
21	if y := x << (i&5); y != 12345<<1 {
22		println("BUG bug344a", y)
23	}
24
25	i = 70
26	if y := x << i; y != 0 {
27		println("BUG bug344b", y)
28	}
29
30	i = 1<<32
31	if y := x << i; y != 0 {
32		println("BUG bug344c", y)
33	}
34}
35
36
37/*
38typecheck [1008592b0]
39.   INDREG a(1) l(15) x(24) tc(2) runtime.ret G0 string
40bug343.go:15: internal compiler error: typecheck INDREG
41*/
42