From dd935a565b5b0fcba5cc595407261cbb1ed48e39 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 4 Oct 2019 11:37:16 +0000 Subject: [PATCH] re PR debug/91968 (DW_AT_low_pc missing for DW_TAG_label with LTO) 2019-10-04 Richard Biener PR lto/91968 * tree.c (find_decls_types_r): Do not remove LABEL_DECLs from BLOCK_VARS. From-SVN: r276571 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a303c5dc9a..97e48c0f028 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-04 Richard Biener + + PR lto/91968 + * tree.c (find_decls_types_r): Do not remove LABEL_DECLs from + BLOCK_VARS. + 2019-10-04 Richard Biener PR tree-optimization/91982 diff --git a/gcc/tree.c b/gcc/tree.c index 59ea6b93454..e845fc7a00e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5963,8 +5963,9 @@ find_decls_types_r (tree *tp, int *ws, void *data) { 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); -- 2.30.2