Commit b1c8f01a by Per Bothner Committed by Richard Kenner

(do_identifier): Use global binding in preference of dead for local

variable.

From-SVN: r10352
parent 38267a70
...@@ -2920,6 +2920,8 @@ do_identifier (token) ...@@ -2920,6 +2920,8 @@ do_identifier (token)
if (TREE_CODE (id) == VAR_DECL && DECL_DEAD_FOR_LOCAL (id)) if (TREE_CODE (id) == VAR_DECL && DECL_DEAD_FOR_LOCAL (id))
{ {
tree shadowed = DECL_SHADOWED_FOR_VAR (id); tree shadowed = DECL_SHADOWED_FOR_VAR (id);
if (!shadowed)
shadowed = IDENTIFIER_GLOBAL_VALUE (DECL_NAME (id));
if (shadowed) if (shadowed)
{ {
if (!DECL_ERROR_REPORTED (id)) if (!DECL_ERROR_REPORTED (id))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment