From: Martin Liska Date: Fri, 17 Apr 2020 08:57:03 +0000 (+0200) Subject: Initialize file_data->lto_section_header before lto_mode_identity_table call. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b835645c7a51b7e99092abe61d677aa491836f95;p=gcc.git Initialize file_data->lto_section_header before lto_mode_identity_table call. PR lto/94612 * lto-common.c: Initialize file_data->lto_section_header before lto_mode_identity_table call. It is needed because it decompresses a LTO section. --- diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 829b26d4005..a0c14899d75 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2020-04-17 Martin Liska + + PR lto/94612 + * lto-common.c: Initialize file_data->lto_section_header + before lto_mode_identity_table call. It is needed because + it decompresses a LTO section. + 2020-04-08 Martin Liska PR c++/94314 diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c index e073abce2e7..cee5f0e9935 100644 --- a/gcc/lto/lto-common.c +++ b/gcc/lto/lto-common.c @@ -2197,11 +2197,6 @@ lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file, file_data->renaming_hash_table = lto_create_renaming_table (); file_data->file_name = file->filename; file_data->order = order; -#ifdef ACCEL_COMPILER - lto_input_mode_table (file_data); -#else - file_data->mode_table = lto_mode_identity_table; -#endif /* Read and verify LTO section. */ data = lto_get_summary_section_data (file_data, LTO_section_lto, &len); @@ -2217,6 +2212,12 @@ lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file, file_data->lto_section_header.minor_version, file_data->file_name); +#ifdef ACCEL_COMPILER + lto_input_mode_table (file_data); +#else + file_data->mode_table = lto_mode_identity_table; +#endif + data = lto_get_summary_section_data (file_data, LTO_section_decls, &len); if (data == NULL) {