[Bug debug/91968] DW_AT_low_pc missing for DW_TAG_label with LTO
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 4 08:23:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91968
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the simple reason is we strip them during free-lang-data. Fix:
Index: gcc/tree.c
===================================================================
--- gcc/tree.c (revision 276396)
+++ gcc/tree.c (working copy)
@@ -5936,8 +5936,9 @@ find_decls_types_r (tree *tp, int *ws, v
{
for (tree *tem = &BLOCK_VARS (t); *tem; )
{
- if (TREE_CODE (*tem) != VAR_DECL
- || !auto_var_in_fn_p (*tem, DECL_CONTEXT (*tem)))
+ if (TREE_CODE (*tem) != LABEL_DECL
+ && (TREE_CODE (*tem) != VAR_DECL
+ || !auto_var_in_fn_p (*tem, DECL_CONTEXT (*tem))))
{
gcc_assert (TREE_CODE (*tem) != RESULT_DECL
&& TREE_CODE (*tem) != PARM_DECL);
More information about the Gcc-bugs
mailing list