re PR debug/91968 (DW_AT_low_pc missing for DW_TAG_label with LTO)
authorRichard Biener <rguenther@suse.de>
Fri, 4 Oct 2019 11:37:16 +0000 (11:37 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 4 Oct 2019 11:37:16 +0000 (11:37 +0000)
2019-10-04  Richard Biener  <rguenther@suse.de>

PR lto/91968
* tree.c (find_decls_types_r): Do not remove LABEL_DECLs from
BLOCK_VARS.

From-SVN: r276571

gcc/ChangeLog
gcc/tree.c

index 9a303c5dc9a756aa4c056312203e27c45d73c166..97e48c0f028bb57fe692310fe774ee337a67242a 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-04  Richard Biener  <rguenther@suse.de>
+
+       PR lto/91968
+       * tree.c (find_decls_types_r): Do not remove LABEL_DECLs from
+       BLOCK_VARS.
+
 2019-10-04  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/91982
index 59ea6b934540e6f359dad9755003213a7a12ac93..e845fc7a00ee038b03d7a14d2b2d111f1197ac62 100644 (file)
@@ -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);