Message ID | CAEwic4ZpUxhBoO2pdmb0SEArHA8n2gxOraTS2Z5z3ruSrJUX_A@mail.gmail.com |
---|---|
State | New |
Headers | show |
My patch from yesterday fixed this bug. PR c++/64080 * constexpr.c (cxx_eval_store_expression): Handle non-decl store targets. Jason
On Thu, Dec 04, 2014 at 02:37:54PM -0500, Jason Merrill wrote: > My patch from yesterday fixed this bug. > > PR c++/64080 > * constexpr.c (cxx_eval_store_expression): Handle non-decl store > targets. I don't see such a patch neither on ML nor in git. Marek
On 12/04/2014 03:05 PM, Marek Polacek wrote: > On Thu, Dec 04, 2014 at 02:37:54PM -0500, Jason Merrill wrote: >> My patch from yesterday fixed this bug. >> >> PR c++/64080 >> * constexpr.c (cxx_eval_store_expression): Handle non-decl store >> targets. > > I don't see such a patch neither on ML nor in git. Oops, I haven't actually checked it in yet! Jason
Index: constexpr.c =================================================================== --- constexpr.c (Revision 218142) +++ constexpr.c (Arbeitskopie) @@ -2486,7 +2550,9 @@ cxx_eval_store_expression (const constexpr_ctx *ct vec_safe_push (refs, TREE_TYPE (probe)); probe = TREE_OPERAND (probe, 0); break; - + case INDIRECT_REF: + probe = TREE_OPERAND (probe, 0); + break; default: object = probe; gcc_assert (DECL_P (object)); Index: gcc/gcc/testsuite/g++.dg/pr64106.C =================================================================== --- /dev/null +++ gcc/gcc/testsuite/g++.dg/pr64106.C @@ -0,0 +1,8 @@ +/* { dg-do compile } */ + +void +f (long &c, int &lc, char *&out) +{ + while (lc >= 8) *out++ = (c >> (lc -= 8)); +}