diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 06:45:15 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 06:45:15 +0000 |
commit | f3d3a8e25ed135d4c539aed7203030dc140d4820 (patch) | |
tree | e0dee3b9bf6420657cea4b3e36c2550d4e9614f9 /gcc/stmt.c | |
parent | 2113f013b978972368794f4e76b47553d19186e1 (diff) | |
download | gcc-f3d3a8e25ed135d4c539aed7203030dc140d4820.tar.gz |
PR optimization/7675
* c-typeck.c (build_external_ref): Set the DECL_NONLOCAL flag
on VAR_DECL, PARM_DECL and FUNCTION_DECL from within
nested functions if they refer to declarations from parent functions.
* stmt.c (expand_decl): Don't put automatic variables in registers
if the DECL_NONLOCAL flag is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65774 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 642a5b1ccfc..9caa5c2b54c 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -3924,6 +3924,7 @@ expand_decl (decl) && !(flag_float_store && TREE_CODE (type) == REAL_TYPE) && ! TREE_THIS_VOLATILE (decl) + && ! DECL_NONLOCAL (decl) && (DECL_REGISTER (decl) || optimize)) { /* Automatic variable that can go in a register. */ |