re PR lto/64075 (ICE: in bp_pack_value, at data-streamer.h:106)

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.

From-SVN: r218083
This commit is contained in:
Ilya Enkovich 2014-11-26 13:53:38 +00:00 committed by Ilya Enkovich
parent 5e4683dc2f
commit 3c350d48a5
5 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2014-11-26 Ilya Enkovich <ilya.enkovich@intel.com>
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.
2014-11-21 Mark Wielaard <mjw@redhat.com>
* doc/invoke.texi (-gdwarf-@{version}): Mention experimental DWARFv5.

View File

@ -1,3 +1,8 @@
2014-11-26 Ilya Enkovich <ilya.enkovich@intel.com>
PR lto/64075
* gcc.dg/pr64075.c: New.
2014-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.target/i386/pr63620.c: XFAIL get_pc_thunk scan on

View File

@ -0,0 +1,9 @@
/* PR lto/64075 */
/* { dg-do compile } */
/* { dg-require-effective-target lto } */
/* { dg-options "-flto" } */
_Complex float test (float a, float b, float c, float d)
{
return 1.0iF;
}

View File

@ -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");

View File

@ -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);
}