[gcc/devel/omp/gcc-9] backport: [multiple changes]

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 13:51:00 GMT 2020


https://gcc.gnu.org/g:56067ed5759ad098d52570a8c6e27063838ebef6

commit 56067ed5759ad098d52570a8c6e27063838ebef6
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Aug 12 12:59:08 2019 +0000

    backport: [multiple changes]
    
    2019-08-12  Richard Biener  <rguenther@suse.de>
    
    	Backport from mainline
    	2019-08-12  Richard Biener  <rguenther@suse.de>
    
    	PR lto/91375
    	* tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on
    	flag_devirtualize.
    
    	2019-08-12  Richard Biener  <rguenther@suse.de>
    
    	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  <rearnsha@arm.com>
    
    	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:
---
 gcc/ChangeLog     | 24 ++++++++++++++++++++++++
 gcc/lto-wrapper.c | 10 +++-------
 gcc/tree.c        |  3 +--
 3 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7e041f1..2befb71 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,27 @@
+2019-08-12  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2019-08-12  Richard Biener  <rguenther@suse.de>
+
+	PR lto/91375
+	* tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on
+	flag_devirtualize.
+
+	2019-08-12  Richard Biener  <rguenther@suse.de>
+
+	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  <rearnsha@arm.com>
+
+	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  <jakub@redhat.com>
 
 	* BASE-VER: Set to 9.2.1.
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index ac97149..10bd7c9 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 73102c4..b82d73c 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;
 	}
     }



More information about the Gcc-cvs mailing list