aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-01-09 21:33:59 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-01-09 21:33:59 +0000
commit81e0f09288052014c5fb3136e6abc9dfcc7629db (patch)
treed85e4d07a55f301cdce0f9af88f503c2cc802899 /libstdc++-v3/python
parent6ef72c3661318d0b5d7e3fc8821d136bbba37194 (diff)
downloadgcc-81e0f09288052014c5fb3136e6abc9dfcc7629db.zip
gcc-81e0f09288052014c5fb3136e6abc9dfcc7629db.tar.gz
gcc-81e0f09288052014c5fb3136e6abc9dfcc7629db.tar.bz2
compiler: make top-level decl for address-taken non-escaping locals
If a local variable's address is taken and passed out of its lexical scope, GCC backend may reuse the stack slot for the variable, not knowing it is still live through a pointer. In this case, we create a top-level temporary variable and let the user-defined variable refer to the temporary variable as its storage location. As the temporary variable is declared at the top level, its stack slot will remain live throughout the function. Reviewed-on: https://go-review.googlesource.com/84675 * go-gcc.cc (local_variable): Add decl_var parameter. From-SVN: r256398
Diffstat (limited to 'libstdc++-v3/python')
0 files changed, 0 insertions, 0 deletions