https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075

--- Comment #4 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
(In reply to H.J. Lu from comment #3)
> It was caused by r217655.
The problem was introduced earlier when function_code field in
tree_function_decl was extended to 12 bits.  LTO streamers were not fixed
appropriately.  r217655 increased BUILT_IN_COMPLEX_MUL_MIN value and put it out
of 11 bits which revealed the problem.

With this patch compiles OK:

diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index 99448dd..eb205ed 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -333,7 +333,7 @@ unpack_ts_function_decl_value_fields (struct bitpack_d *bp,
tree expr)
   if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN)
     {
       DECL_FUNCTION_CODE (expr) = (enum built_in_function) bp_unpack_value
(bp,
-                                                                          
11);
+                                                                          
12);
       if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_NORMAL
          && DECL_FUNCTION_CODE (expr) >= END_BUILTINS)
        fatal_error ("machine independent builtin code out of range");
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index ad58b84..0d87cff 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -300,7 +300,7 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp,
tree expr)
   bp_pack_value (bp, DECL_PURE_P (expr), 1);
   bp_pack_value (bp, DECL_LOOPING_CONST_OR_PURE_P (expr), 1);
   if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN)
-    bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 11);
+    bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 12);
 }

Reply via email to