[Bug c/94730] [8/9/10 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2435

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 23 14:26:00 GMT 2020


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, with
int x, y;

void
foo ()
{
  x = 0;
  y = 0;
  if (x != 0)
    y++;
  else
    x++;
}

int x[1] = { 0 };

the type of x isn't overritten, only when it is int x[] = { 0 };

The type replacement happened in pop_scope:
1370                  gcc_assert (I_SYMBOL_BINDING (b->id) == b);
1371                  I_SYMBOL_BINDING (b->id) = b->shadowed;
1372                  if (b->shadowed && b->shadowed->u.type)
1373                    TREE_TYPE (b->shadowed->decl) = b->shadowed->u.type;


More information about the Gcc-bugs mailing list