This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Handle DECL_DEBUG_EXPR
- From: "Diego Novillo" <dnovillo at google dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Sep 2008 18:40:05 -0400
- Subject: [lto] Handle DECL_DEBUG_EXPR
We can now handle DECL_DEBUG_EXPR. Fixes g++.dg/lto/20080908-2.C and
g++.dg/lto/20080912-1.C.
Diego.
* lto-function-in.c (input_var_decl): Do not abort if
DEBUG_EXPR is set.
Index: lto-function-in.c
===================================================================
--- lto-function-in.c (revision 140642)
+++ lto-function-in.c (working copy)
@@ -3017,10 +3017,6 @@ input_var_decl (struct lto_input_block *
if (debug_expr)
SET_DECL_DEBUG_EXPR (decl, debug_expr);
-
- /* FIXME lto: We can't backpatch these correctly,
- but we shouldn't be seeing them anyway. */
- gcc_assert (!debug_expr);
}
/* FIXME lto: Adapted from DWARF reader. Probably needs more thought.
@@ -3037,9 +3033,9 @@ input_var_decl (struct lto_input_block *
/* FIXME lto: We normally pre-mangle names before we serialize them
out. Here, in lto1, we do not know the language, and thus cannot
do the mangling again. Instead, we just append a suffix to the
- mangled name. The resulting name, however, is not a
properly-formed
- mangled name, and will confuse any attempt to unmangle it. */
-
+ mangled name. The resulting name, however, is not a
+ properly-formed mangled name, and will confuse any attempt to
+ unmangle it. */
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
char *label;