[Bug c++/89336] internal compiler error when compiling a constexpr function

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 13 17:00:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89336

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The ICE actually isn't when processing the loop, but later on when processing
the
VIEW_CONVERT_EXPR<struct A>({.a={0, 1, 2, 3, 4, 5, [8]=1, 2, 3, 4, 5, }});
expression.
When using
    {
      r[i] = i;
      r[i + 8] = i;
    }
as the loop body, I instead get:
{.a={0, 1, 2, 3, 4, 5, [8]=0, 1, 2, 3, 4, 5}}

In the bogus one, [8] doesn't have the value 0 but 1 and all the values are
shifted by 1, with [13] having NULL value, just non-NULL purpose.


More information about the Gcc-bugs mailing list