test/fixedbugs/issue78641.go
raw| 1 | // run |
| 2 | |
| 3 | // Copyright 2026 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 ( |
| 10 | intSize = 32 << (^uint(0) >> 63) |
| 11 | minInt = -1 << (intSize - 1) |
| 12 | ) |
| 13 | |
| 14 | func main() { |
| 15 | f() |
| 16 | } |
| 17 | |
| 18 | func f() { |
| 19 | for i := 0; true; i += minInt { |
| 20 | if i < 0 { |
| 21 | return |
| 22 | } |
| 23 | } |
| 24 | panic("unreachable") |
| 25 | } |