]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: save local var list before inlining
authorIan Lance Taylor <iant@golang.org>
Wed, 12 Jun 2013 03:23:21 +0000 (20:23 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 12 Jun 2013 03:23:21 +0000 (20:23 -0700)
commitae5e791ed20076bf67e5da20fee769ec86a7a969
tree8b2d73acda55731fb22f24a44995867560cd3574
parente440354c404cccf93be1a764353c2ccb278cefbf
cmd/gc: save local var list before inlining

This avoids problems with inlining in genwrappers, which
occurs after functions have been compiled.  Compiling a
function may cause some unused local vars to be removed from
the list.  Since a local var may be unused due to
optimization, it is possible that a removed local var winds up
beingused in the inlined version, in which case hilarity
ensues.

Fixes #5515.

R=golang-dev, khr, dave
CC=golang-dev
https://golang.org/cl/10210043
src/cmd/gc/go.h
src/cmd/gc/inl.c
test/fixedbugs/issue5515.go [new file with mode: 0644]