blob: 009ec9f6c255efd23cb5b9ff6f18a6f454e71cba [file] [log] [blame]
Colin Cross1371fe42019-03-19 21:08:48 -07001// compile
2
3// Copyright 2018 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 27143: cmd/compile: erroneous application of walkinrange
8// optimization for const over 2**63
9
10package p
11
12var c uint64
13
14var b1 bool = 0x7fffffffffffffff < c && c < 0x8000000000000000
15var b2 bool = c < 0x8000000000000000 && 0x7fffffffffffffff < c
16var b3 bool = 0x8000000000000000 < c && c < 0x8000000000000001
17var b4 bool = c < 0x8000000000000001 && 0x8000000000000000 < c