]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.1] cmd/gc: save local var list before inlining
authorAndrew Gerrand <adg@golang.org>
Thu, 13 Jun 2013 00:04:17 +0000 (10:04 +1000)
committerAndrew Gerrand <adg@golang.org>
Thu, 13 Jun 2013 00:04:17 +0000 (10:04 +1000)
commit13af44f8a57bb045f8ce7fc4207124329eac2438
treee4120b491a89da0d45461a5fcbd2f53012d19a54
parentb87a963f876d258af844d6a293ea0c3ed80b3407
[release-branch.go1.1] cmd/gc: save local var list before inlining

««« CL 10210043 / b357e33bb414
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
»»»

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