From: Richard Biener Date: Mon, 12 Aug 2019 12:59:08 +0000 (+0000) Subject: backport: [multiple changes] X-Git-Tag: releases/gcc-9.3.0~746 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56067ed5759ad098d52570a8c6e27063838ebef6;p=thirdparty%2Fgcc.git backport: [multiple changes] 2019-08-12 Richard Biener Backport from mainline 2019-08-12 Richard Biener PR lto/91375 * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on flag_devirtualize. 2019-08-12 Richard Biener PR driver/91130 * lto-wrapper.c (get_options_from_collect_gcc_options): Remove lang_mask option, always use CL_DRIVER. (find_and_merge_options): Adjust. (run_gcc): Likewise. 2019-08-07 Richard Earnshaw PR driver/91130 * lto-wrapper.c (find_and_merge_options): Use CL_DRIVER when processing COLLECT_GCC_OPTIONS. (run_gcc): Likewise. From-SVN: r274311 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e041f1c318d..2befb71beaa4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,27 @@ +2019-08-12 Richard Biener + + Backport from mainline + 2019-08-12 Richard Biener + + PR lto/91375 + * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on + flag_devirtualize. + + 2019-08-12 Richard Biener + + PR driver/91130 + * lto-wrapper.c (get_options_from_collect_gcc_options): Remove + lang_mask option, always use CL_DRIVER. + (find_and_merge_options): Adjust. + (run_gcc): Likewise. + + 2019-08-07 Richard Earnshaw + + PR driver/91130 + * lto-wrapper.c (find_and_merge_options): Use CL_DRIVER when + processing COLLECT_GCC_OPTIONS. + (run_gcc): Likewise. + 2019-08-12 Jakub Jelinek * BASE-VER: Set to 9.2.1. diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index ac9714940549..10bd7c9becbc 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -128,12 +128,11 @@ maybe_unlink (const char *file) #define DUMPBASE_SUFFIX ".ltrans18446744073709551615" /* Create decoded options from the COLLECT_GCC and COLLECT_GCC_OPTIONS - environment according to LANG_MASK. */ + environment. */ static void get_options_from_collect_gcc_options (const char *collect_gcc, const char *collect_gcc_options, - unsigned int lang_mask, struct cl_decoded_option **decoded_options, unsigned int *decoded_options_count) { @@ -175,8 +174,7 @@ get_options_from_collect_gcc_options (const char *collect_gcc, argc = obstack_object_size (&argv_obstack) / sizeof (void *) - 1; argv = XOBFINISH (&argv_obstack, const char **); - decode_cmdline_options_to_array (argc, (const char **)argv, - lang_mask, + decode_cmdline_options_to_array (argc, (const char **)argv, CL_DRIVER, decoded_options, decoded_options_count); obstack_free (&argv_obstack, NULL); } @@ -1008,8 +1006,7 @@ find_and_merge_options (int fd, off_t file_offset, const char *prefix, { struct cl_decoded_option *f2decoded_options; unsigned int f2decoded_options_count; - get_options_from_collect_gcc_options (collect_gcc, - fopts, CL_LANG_ALL, + get_options_from_collect_gcc_options (collect_gcc, fopts, &f2decoded_options, &f2decoded_options_count); if (!fdecoded_options) @@ -1150,7 +1147,6 @@ run_gcc (unsigned argc, char *argv[]) fatal_error (input_location, "environment variable COLLECT_GCC_OPTIONS must be set"); get_options_from_collect_gcc_options (collect_gcc, collect_gcc_options, - CL_LANG_ALL, &decoded_options, &decoded_options_count); diff --git a/gcc/tree.c b/gcc/tree.c index 73102c4e75bd..b82d73c8517d 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5514,8 +5514,7 @@ free_lang_data_in_type (tree type, struct free_lang_data_d *fld) free_lang_data_in_binfo (TYPE_BINFO (type)); /* We need to preserve link to bases and virtual table for all polymorphic types to make devirtualization machinery working. */ - if (!BINFO_VTABLE (TYPE_BINFO (type)) - || !flag_devirtualize) + if (!BINFO_VTABLE (TYPE_BINFO (type))) TYPE_BINFO (type) = NULL; } }