1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:40:23 -07:00
go/test/fixedbugs/issue12347.go
Keith Randall 186cf1b9ba [dev.ssa] cmd/compile/internal/ssa: handle dead code a different way
Instead of trying to delete dead code as soon as we find it, just
mark it as dead using a PlainAndDead block kind.  The deadcode pass
will do the real removal.

This way is somewhat more efficient because we don't need to mess
with successor and predecessor lists of all the dead blocks.

Fixes #12347

Change-Id: Ia42d6b5f9cdb3215a51737b3eb117c00bd439b13
Reviewed-on: https://go-review.googlesource.com/14033
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-08-29 17:21:02 +00:00

17 lines
264 B
Go

// compile
// Copyright 2015 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.
package p
func f_ssa(x int, p *int) {
if false {
y := x + 5
for {
*p = y
}
}
}