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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
E.g.
static int foo ();

int
bar (int n)
{
  return foo (n, 2.0);
}

static inline int
foo (int n, struct T { char a[n]; } b)
{
  int r = 0, i;
  for (i = 0; i < n; i++)
    r += b.a[i];
  return r;
}

ICEs at -O2 too.  And there is no WITH_SIZE_EXPR argument in that case.
So I think next to looking for WITH_SIZE_EXPR arguments it should also look
through callee DECL_ARGUMENTS if any argument has non-constant TYPE_SIZE* (or
DECL_SIZE*?).

Reply via email to