Commit 91856735 by Richard Biener Committed by Richard Biener

re PR lto/60405 (ICE in lto1 on x86_64-linux-gnu)

2014-03-04  Richard Biener  <rguenther@suse.de>

	PR lto/60405
	* lto-streamer-in.c (lto_read_body): Remove LTO bytecode version
	check.
	(lto_input_toplevel_asms): Likewise.
	* lto-section-in.c (lto_get_section_data): Instead do it here
	for every section.

From-SVN: r208311
parent 064fd5a8
2014-03-04 Richard Biener <rguenther@suse.de> 2014-03-04 Richard Biener <rguenther@suse.de>
PR lto/60405
* lto-streamer-in.c (lto_read_body): Remove LTO bytecode version
check.
(lto_input_toplevel_asms): Likewise.
* lto-section-in.c (lto_get_section_data): Instead do it here
for every section.
2014-03-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/60382 PR tree-optimization/60382
* tree-vect-loop.c (vect_is_simple_reduction_1): Do not consider * tree-vect-loop.c (vect_is_simple_reduction_1): Do not consider
dead PHIs a reduction. dead PHIs a reduction.
......
...@@ -153,26 +153,30 @@ lto_get_section_data (struct lto_file_decl_data *file_data, ...@@ -153,26 +153,30 @@ lto_get_section_data (struct lto_file_decl_data *file_data,
/* FIXME lto: WPA mode does not write compressed sections, so for now /* FIXME lto: WPA mode does not write compressed sections, so for now
suppress uncompression if flag_ltrans. */ suppress uncompression if flag_ltrans. */
if (flag_ltrans) if (!flag_ltrans)
return data; {
/* Create a mapping header containing the underlying data and length,
/* Create a mapping header containing the underlying data and length, and prepend this to the uncompression buffer. The uncompressed data
and prepend this to the uncompression buffer. The uncompressed data then follows, and a pointer to the start of the uncompressed data is
then follows, and a pointer to the start of the uncompressed data is returned. */
returned. */ header = (struct lto_data_header *) xmalloc (header_length);
header = (struct lto_data_header *) xmalloc (header_length); header->data = data;
header->data = data; header->len = *len;
header->len = *len;
buffer.data = (char *) header;
buffer.data = (char *) header; buffer.length = header_length;
buffer.length = header_length;
stream = lto_start_uncompression (lto_append_data, &buffer);
stream = lto_start_uncompression (lto_append_data, &buffer); lto_uncompress_block (stream, data, *len);
lto_uncompress_block (stream, data, *len); lto_end_uncompression (stream);
lto_end_uncompression (stream);
*len = buffer.length - header_length;
data = buffer.data + header_length;
}
*len = buffer.length - header_length; lto_check_version (((lto_header *)data)->major_version,
return buffer.data + header_length; ((lto_header *)data)->minor_version);
return data;
} }
......
...@@ -1059,10 +1059,6 @@ lto_read_body (struct lto_file_decl_data *file_data, struct cgraph_node *node, ...@@ -1059,10 +1059,6 @@ lto_read_body (struct lto_file_decl_data *file_data, struct cgraph_node *node,
data_in = lto_data_in_create (file_data, data + string_offset, data_in = lto_data_in_create (file_data, data + string_offset,
header->string_size, vNULL); header->string_size, vNULL);
/* Make sure the file was generated by the exact same compiler. */
lto_check_version (header->lto_header.major_version,
header->lto_header.minor_version);
if (section_type == LTO_section_function_body) if (section_type == LTO_section_function_body)
{ {
struct lto_in_decl_state *decl_state; struct lto_in_decl_state *decl_state;
...@@ -1331,10 +1327,6 @@ lto_input_toplevel_asms (struct lto_file_decl_data *file_data, int order_base) ...@@ -1331,10 +1327,6 @@ lto_input_toplevel_asms (struct lto_file_decl_data *file_data, int order_base)
data_in = lto_data_in_create (file_data, data + string_offset, data_in = lto_data_in_create (file_data, data + string_offset,
header->string_size, vNULL); header->string_size, vNULL);
/* Make sure the file was generated by the exact same compiler. */
lto_check_version (header->lto_header.major_version,
header->lto_header.minor_version);
while ((str = streamer_read_string_cst (data_in, &ib))) while ((str = streamer_read_string_cst (data_in, &ib)))
{ {
struct asm_node *node = add_asm_node (str); struct asm_node *node = add_asm_node (str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment