add_node_to (encoder, node, true);
lto_set_symtab_encoder_in_partition (encoder, node);
create_references (encoder, node);
- /* For proper debug info, we need to ship the origins, too. */
- if (DECL_ABSTRACT_ORIGIN (node->decl))
- {
- struct cgraph_node *origin_node
- = cgraph_node::get_create (DECL_ABSTRACT_ORIGIN (node->decl));
- origin_node->used_as_abstract_origin = true;
- add_node_to (encoder, origin_node, true);
- }
}
for (lsei = lsei_start_variable_in_partition (in_encoder);
!lsei_end_p (lsei); lsei_next_variable_in_partition (&lsei))
lto_set_symtab_encoder_in_partition (encoder, vnode);
lto_set_symtab_encoder_encode_initializer (encoder, vnode);
create_references (encoder, vnode);
- /* For proper debug info, we need to ship the origins, too. */
- if (DECL_ABSTRACT_ORIGIN (vnode->decl))
- {
- varpool_node *origin_node
- = varpool_node::get (DECL_ABSTRACT_ORIGIN (vnode->decl));
- lto_set_symtab_encoder_in_partition (encoder, origin_node);
- }
}
/* Pickle in also the initializer of all referenced readonly variables
to help folding. Constant pool variables are not shared, so we must
--- /dev/null
+// { dg-do compile }
+// { dg-require-effective-target lto }
+// { dg-options "-flto" }
+
+template <class T> class foo {
+ foo() { int const bar[2] = {1, 1}; }
+};
+template class foo<int>;