* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
@ 2014-11-25 21:25 ` d.g.gorbachev at gmail dot com
2014-11-25 21:52 ` hjl.tools at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2014-11-25 21:25 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
2014-11-25 21:25 ` [Bug lto/64075] " d.g.gorbachev at gmail dot com
@ 2014-11-25 21:52 ` hjl.tools at gmail dot com
2014-11-25 22:29 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-25 21:52 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
2014-11-25 21:25 ` [Bug lto/64075] " d.g.gorbachev at gmail dot com
2014-11-25 21:52 ` hjl.tools at gmail dot com
@ 2014-11-25 22:29 ` hjl.tools at gmail dot com
2014-11-26 8:51 ` enkovich.gnu at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-25 22:29 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2014-11-25 22:29 ` hjl.tools at gmail dot com
@ 2014-11-26 8:51 ` enkovich.gnu at gmail dot com
2014-11-26 10:11 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-26 8:51 UTC (permalink / raw)
To: gcc-bugs
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);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
2014-11-26 8:51 ` enkovich.gnu at gmail dot com
@ 2014-11-26 10:11 ` rguenth at gcc dot gnu.org
2014-11-26 13:54 ` ienkovich at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-26 10:11 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2014-11-26 10:11 ` rguenth at gcc dot gnu.org
@ 2014-11-26 13:54 ` ienkovich at gcc dot gnu.org
2014-11-26 16:28 ` d.g.gorbachev at gmail dot com
2014-11-26 17:54 ` enkovich.gnu at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2014-11-26 13:54 UTC (permalink / raw)
To: gcc-bugs
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=218083&root=gcc&view=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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
` (5 preceding siblings ...)
2014-11-26 13:54 ` ienkovich at gcc dot gnu.org
@ 2014-11-26 16:28 ` d.g.gorbachev at gmail dot com
2014-11-26 17:54 ` enkovich.gnu at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2014-11-26 16:28 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106
2014-11-25 21:23 [Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 d.g.gorbachev at gmail dot com
` (6 preceding siblings ...)
2014-11-26 16:28 ` d.g.gorbachev at gmail dot com
@ 2014-11-26 17:54 ` enkovich.gnu at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-26 17:54 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread