On Wed, Nov 26, 2014 at 10:35 AM, Ilya Enkovich <enkovich....@gmail.com> wrote: > Hi, > > This patch fixes LTO streamers which were not adjusted when function_code > field was extended up to 12 bits. > > OK for trunk after bootstrap and check?
Ok. Thanks, Richard. > Thanks, > Ilya > -- > gcc/ > > 2014-11-26 Ilya Enkovich <ilya.enkov...@intel.com> > > * 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/ > > 2014-11-26 Ilya Enkovich <ilya.enkov...@intel.com> > > * gcc.dg/pr64075.c: New. > > > diff --git a/gcc/testsuite/gcc.dg/pr64075.c b/gcc/testsuite/gcc.dg/pr64075.c > new file mode 100644 > index 0000000..f3c8dc4 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/pr64075.c > @@ -0,0 +1,8 @@ > +/* PR lto/64075 */ > +/* { dg-do compile } */ > +/* { dg-options "-flto" } */ > + > +_Complex float test (float a, float b, float c, float d) > +{ > + return 1.0iF; > +} > 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); > } > >