[Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 10 15:58:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.10 15:58:39
Ever Confirmed|0 |1
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-10 15:58:39 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > Hm, well. Then the debug machinery has to deal with type mismatches I guess.
>
> Well, all the debug machinery cares is that the var has the original, declared
> type.
>
> > But I wonder why we have debug-stmts for global variables anyway? I thought
> > they are only used for registers.
>
> It is not a global variable, it is a VAR_DECL with DECL_ABSTRACT_ORIGIN
> PARM_DECL in bar, i.e. optimized away parameter/automatic variable. It is a
> non-localized var in main, because it is never referenced there, except for
> GIMPLE_DEBUG.
Ah, ok. The fix is then to amend the
1768 if (TREE_CODE (*basep) == VAR_DECL
1769 && !auto_var_in_fn_p (*basep, current_function_decl))
check properly. The easiest check would be && !is_gimple_debug, or
a auto_var_in_fn_p variant without a specific function, thus auto_var_p.
More information about the Gcc-bugs
mailing list