Patch by Richard Biener
authorJan Hubicka <hubicka@ucw.cz>
Mon, 11 May 2015 02:48:49 +0000 (04:48 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 11 May 2015 02:48:49 +0000 (02:48 +0000)
Patch by Richard Biener
* coverage.c (coverage_obj_init): Delay building of type variant
until the type is finished.

From-SVN: r222990

gcc/ChangeLog
gcc/coverage.c

index 73f6be6d390474f24196d8fad441ea9b805d90ab..d2db83475a77e64ad9e68c7e05ab61b72fcff9e8 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-09  Jan Hubicka  <hubicka@ucw.cz>
+
+       Patch by Richard Biener
+       * coverage.c (coverage_obj_init): Delay building of type variant
+       until the type is finished.
+
 2015-05-09  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-devirt.c (warn_types_mismatch): Do not ICE when warning about
index e1d81ff2949fd6129b7e2c9bde611cc2748f72c9..ff7249acaa72f49d72e2d422810da5874126ad68 100644 (file)
@@ -1141,9 +1141,10 @@ coverage_obj_init (void)
   /* Build the info and fn_info types.  These are mutually recursive.  */
   gcov_info_type = lang_hooks.types.make_type (RECORD_TYPE);
   gcov_fn_info_type = lang_hooks.types.make_type (RECORD_TYPE);
+  build_fn_info_type (gcov_fn_info_type, n_counters, gcov_info_type);
+  gcov_info_type = lang_hooks.types.make_type (RECORD_TYPE);
   gcov_fn_info_ptr_type = build_pointer_type
     (build_qualified_type (gcov_fn_info_type, TYPE_QUAL_CONST));
-  build_fn_info_type (gcov_fn_info_type, n_counters, gcov_info_type);
   build_info_type (gcov_info_type, gcov_fn_info_ptr_type);
   
   /* Build the gcov info var, this is referred to in its own