Message ID | 20141126093529.GA40854@msticlxl57.ims.intel.com |
---|---|
State | New |
Headers | show |
On Wed, Nov 26, 2014 at 10:35 AM, Ilya Enkovich <enkovich.gnu@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.enkovich@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.enkovich@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); > } > >
On Wed, Nov 26, 2014 at 1:35 AM, Ilya Enkovich <enkovich.gnu@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? > > Thanks, > Ilya > -- > gcc/ > > 2014-11-26 Ilya Enkovich <ilya.enkovich@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.enkovich@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" } */ You should use /* { dg-do compile { target lto } } */
On Nov 26, 2014, at 1:35 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote: > 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? Please could you burry this in a #define someplace. I think I have a patch that takes it up to 13, and don't look forward to the same issue. Also 12 is kinda short sighted for a port. 13 is plenty big enough for the next 10 years I suspect.
2014-11-27 19:55 GMT+03:00 Mike Stump <mikestump@comcast.net>: > On Nov 26, 2014, at 1:35 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote: >> 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? > > Please could you burry this in a #define someplace. I think I have a patch that takes it up to 13, and don't look forward to the same issue. Also 12 is kinda short sighted for a port. 13 is plenty big enough for the next 10 years I suspect. I've committed the patch already.
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); }