aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-27 14:22:55 -0700
committerIan Lance Taylor <iant@golang.org>2020-07-27 17:02:58 -0700
commite1d3a86fd3e91ccdbc702fc99595116adeded0d5 (patch)
tree085acf33e61ea6e37dfa594bc383b507961fbda9 /libgo/go
parent1b024c9a29701fce8c6aa0d2a321829a07b39123 (diff)
downloadgcc-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