This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/26754] [4.0/4.1/4.2 Regression] Wrong debug info for variable accessed non-locally



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]