Source file test/fixedbugs/issue27143.go

     1  // 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  
    10  package p
    11  
    12  var c uint64
    13  
    14  var b1 bool = 0x7fffffffffffffff < c && c < 0x8000000000000000
    15  var b2 bool = c < 0x8000000000000000 && 0x7fffffffffffffff < c
    16  var b3 bool = 0x8000000000000000 < c && c < 0x8000000000000001
    17  var b4 bool = c < 0x8000000000000001 && 0x8000000000000000 < c
    18  

View as plain text