[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 Dmitry Gorbachev d.g.gorbachev at gmail dot com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #8 from Dmitry Gorbachev d.g.gorbachev at gmail dot com --- Well, then resolving the bug as fixed.
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
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); }
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P1
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 --- Comment #5 from ienkovich at gcc dot gnu.org --- Author: ienkovich Date: Wed Nov 26 13:53:38 2014 New Revision: 218083 URL: https://gcc.gnu.org/viewcvs?rev=218083root=gccview=rev Log: gcc/ PR lto/64075 * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Use proper size for function_code bitfield. (pack_ts_function_decl_value_fields): Likewise. gcc/testsuite/ PR lto/64075 * gcc.dg/pr64075.c: New. Added: trunk/gcc/testsuite/gcc.dg/pr64075.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-streamer-in.c trunk/gcc/tree-streamer-out.c
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 --- Comment #6 from Dmitry Gorbachev d.g.gorbachev at gmail dot com --- The patch works, thanks! But the committed test is incorrect, because the original, unpatched compiler, does not fail on it. It failed on functions __mulsc3, __muldc3, __mulxc3, __multc3, __divsc3, __divdc3, __divxc3, and __divtc3.
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 --- Comment #7 from Ilya Enkovich enkovich.gnu at gmail dot com --- (In reply to Dmitry Gorbachev from comment #6) The patch works, thanks! But the committed test is incorrect, because the original, unpatched compiler, does not fail on it. It failed on functions __mulsc3, __muldc3, __mulxc3, __multc3, __divsc3, __divdc3, __divxc3, and __divtc3. Committed test is what you attached as a reproducer with function renamed to 'test'. Why shouldn't it work? I used it to reproduce and debug the issue on today's trunk compiler.
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 Dmitry Gorbachev d.g.gorbachev at gmail dot com changed: What|Removed |Added Keywords||ice-on-valid-code, lto Target||i686-pc-linux-gnu --- Comment #1 from Dmitry Gorbachev d.g.gorbachev at gmail dot com --- This happens when compiling libgcc with -flto.
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added Target|i686-pc-linux-gnu | Status|UNCONFIRMED |NEW Last reconfirmed||2014-11-25 Target Milestone|--- |5.0 Ever confirmed|0 |1 --- Comment #2 from H.J. Lu hjl.tools at gmail dot com --- It also happens on Linux/x86-64 with just -flto.
[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added CC||enkovich.gnu at gmail dot com --- Comment #3 from H.J. Lu hjl.tools at gmail dot com --- It was caused by r217655.