2016-07-01 Cesar Philippidis <cesar@codesourcery.com>
gcc/
* lto-cgraph.c (input_overwrite_node): Change the assertion to an
error for missing symbols.
(input_varpool_node): Likewise.
@@ -1201,9 +1201,11 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
LDPR_NUM_KNOWN);
node->instrumentation_clone = bp_unpack_value (bp, 1);
node->split_part = bp_unpack_value (bp, 1);
- gcc_assert (flag_ltrans
- || (!node->in_other_partition
- && !node->used_from_other_partition));
+
+ int success = flag_ltrans || (!node->in_other_partition
+ && !node->used_from_other_partition);
+ if (!success)
+ error ("Missing %<%s%>", node->name ());
}
/* Return string alias is alias of. */
@@ -1416,9 +1418,11 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->set_section_for_node (section);
node->resolution = streamer_read_enum (ib, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN);
- gcc_assert (flag_ltrans
- || (!node->in_other_partition
- && !node->used_from_other_partition));
+
+ int success = flag_ltrans || (!node->in_other_partition
+ && !node->used_from_other_partition);
+ if (!success)
+ error ("Missing %<%s%>", node->name ());
return node;
}