This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/26754] [4.0/4.1/4.2 Regression] Wrong debug info for variable accessed non-locally
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2006 06:19:07 -0000
- Subject: [Bug debug/26754] [4.0/4.1/4.2 Regression] Wrong debug info for variable accessed non-locally
- References: <bug-26754-226@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2006-06-07 06:19 -------
> The idea of this patch seems OK, but let's find a way to avoid duplicating the
> declare_tmp_vars code, perhaps by making another small routine to find the
> outermost BIND_EXPR in a function?
Do you really want to make a new function for this loop only?
/* C99 mode puts the default 'return 0;' for main outside the outer
braces. So drill down until we find an actual scope. */
while (TREE_CODE (scope) == COMPOUND_EXPR)
scope = TREE_OPERAND (scope, 0);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26754