This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto-streamer] Partial fix for NAMESPACE_DECL streaming
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Bill Maddox <maddox at google dot com>
- Date: Fri, 30 May 2008 23:08:59 -0400
- Subject: [lto-streamer] Partial fix for NAMESPACE_DECL streaming
The problem here is that output_namespace_decl was being too strict in
the assertions for NAMESPACE_DECLs. This now exposes a failure in the
generic streamer that it does not handle template_decls. I will work
on that next week.
Diego.
2008-05-30 Diego Novillo <dnovillo@google.com>
* lto-function-out.c (output_namespace_decl): Fix
assertions for NAMESPACE_DECL.
Index: lto-function-out.c
===================================================================
--- lto-function-out.c (revision 136188)
+++ lto-function-out.c (working copy)
@@ -2473,13 +2473,14 @@ output_namespace_decl (struct output_blo
output_tree (ob, decl->decl_with_vis.assembler_name);
output_tree (ob, decl->decl_with_vis.section_name);
- gcc_assert (decl->common.type == NULL_TREE);
+ gcc_assert (decl->common.type == void_type_node
+ || decl->common.type == NULL_TREE);
output_tree (ob, decl->decl_common.attributes);
output_tree (ob, decl->decl_common.abstract_origin);
gcc_assert (decl->decl_common.mode == 0);
- gcc_assert (decl->decl_common.align == 0);
+ gcc_assert (decl->decl_common.align == 1);
gcc_assert (decl->decl_common.size == NULL_TREE);
gcc_assert (decl->decl_common.size_unit == NULL_TREE);