Source file test/fixedbugs/issue70481.go
1 // run 2 3 // Copyright 2024 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 package main 8 9 const maxUint64 = (1 << 64) - 1 10 11 //go:noinline 12 func f(n uint64) uint64 { 13 return maxUint64 - maxUint64%n 14 } 15 16 func main() { 17 for i := uint64(1); i < 20; i++ { 18 println(i, maxUint64-f(i)) 19 } 20 } 21