[tree-ssa] Missing DECL_NONLOCAL flag
law@redhat.com
law@redhat.com
Thu Jun 26 01:03:00 GMT 2003
Something I noticed while working on the unused variable eliminator....
Variables and parameters on the pending_sizes chain have nonlocal uses.
* c-decl.c (store_parm_decls): Variables and parameters on the
pending_sizes chain have nonlocal uses.
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.334.2.49
diff -c -3 -p -r1.334.2.49 c-decl.c
*** c-decl.c 13 Jun 2003 21:09:13 -0000 1.334.2.49
--- c-decl.c 25 Jun 2003 23:18:52 -0000
*************** store_parm_decls ()
*** 6140,6146 ****
for (t = DECL_LANG_SPECIFIC (fndecl)->pending_sizes;
t;
t = TREE_CHAIN (t))
! SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = context;
}
/* This function is being processed in whole-function mode. */
--- 6140,6152 ----
for (t = DECL_LANG_SPECIFIC (fndecl)->pending_sizes;
t;
t = TREE_CHAIN (t))
! {
! /* We will have a nonlocal use of this variable. */
! if (TREE_CODE (TREE_OPERAND (TREE_VALUE (t), 0)) == VAR_DECL
! || TREE_CODE (TREE_OPERAND (TREE_VALUE (t), 0)) == PARM_DECL)
! DECL_NONLOCAL (TREE_OPERAND (TREE_VALUE (t), 0)) = 1;
! SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = context;
! }
}
/* This function is being processed in whole-function mode. */
More information about the Gcc-patches
mailing list