mirror of
https://github.com/golang/go
synced 2024-11-06 00:36:14 -07:00
2393d16147
The newly upgraded shortcircuit pass attempted to remove infinite loops. Stop doing that. Fixes #33903 Change-Id: I0fc9c1b5f2427e54ce650806602ef5e3ad65aca5 Reviewed-on: https://go-review.googlesource.com/c/go/+/192144 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
17 lines
305 B
Go
17 lines
305 B
Go
// compile
|
|
|
|
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Check that the shortcircuit pass correctly handles infinite loops.
|
|
|
|
package p
|
|
|
|
func f() {
|
|
var p, q bool
|
|
for {
|
|
p = p && q
|
|
}
|
|
}
|