2003-04-29 Mark Mitchell <mark@codesourcery.com>
+ PR c++/10551
+ * pt.c (mark_decl_instantiated): Defer all explicit instantiations
+ that have not yet been written out.
+
+2003-04-29 Mark Mitchell <mark@codesourcery.com>
+
PR c++/10549
* class.c (layout_class_type): Mark overlong bitfields as having
the maximum size permitted by their type, after layout.
tree result;
int extern_p;
{
- if (TREE_CODE (result) != FUNCTION_DECL)
- /* The TREE_PUBLIC flag for function declarations will have been
- set correctly by tsubst. */
- TREE_PUBLIC (result) = 1;
-
/* We used to set this unconditionally; we moved that to
do_decl_instantiation so it wouldn't get set on members of
explicit class template instantiations. But we still need to set
if (extern_p)
SET_DECL_EXPLICIT_INSTANTIATION (result);
+ /* If this entity has already been written out, it's too late to
+ make any modifications. */
+ if (TREE_ASM_WRITTEN (result))
+ return;
+
+ if (TREE_CODE (result) != FUNCTION_DECL)
+ /* The TREE_PUBLIC flag for function declarations will have been
+ set correctly by tsubst. */
+ TREE_PUBLIC (result) = 1;
+
if (! extern_p)
{
DECL_INTERFACE_KNOWN (result) = 1;
else if (TREE_PUBLIC (result))
maybe_make_one_only (result);
}
- else if (TREE_CODE (result) == FUNCTION_DECL)
+
+ if (TREE_CODE (result) == FUNCTION_DECL)
defer_fn (result);
}
2003-04-29 Mark Mitchell <mark@codesourcery.com>
+ PR c++/10551
+ * g++.dg/template/explicit1.C: New test.
+
+2003-04-29 Mark Mitchell <mark@codesourcery.com>
+
PR c++/10549
* g++.dg/other/bitfield1.C: New test.