diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-07-27 14:22:55 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-07-27 17:02:58 -0700 |
commit | e1d3a86fd3e91ccdbc702fc99595116adeded0d5 (patch) | |
tree | 085acf33e61ea6e37dfa594bc383b507961fbda9 /libgo/go | |
parent | 1b024c9a29701fce8c6aa0d2a321829a07b39123 (diff) | |
download | gcc-e1d3a86fd3e91ccdbc702fc99595116adeded0d5.zip gcc-e1d3a86fd3e91ccdbc702fc99595116adeded0d5.tar.gz gcc-e1d3a86fd3e91ccdbc702fc99595116adeded0d5.tar.bz2 |
compiler: for package-scope "a = b; b = x" just set "a = x"
This avoids requiring an init function to initialize the variable.
This can only be done if x is a static initializer.
The go1.15rc1 runtime package relies on this optimization.
The package has a variable "var maxSearchAddr = maxOffAddr".
The maxSearchAddr variable is used by code that runs before package
initialization is complete.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245098
Diffstat (limited to 'libgo/go')
0 files changed, 0 insertions, 0 deletions