[Bug c++/83808] [7/8 Regression] "internal compiler error" for invalid input

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 17 12:35:00 GMT 2018


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Another case:

struct R { int r; };
void baz (char *, char *, char *, char *);

void
foo ()
{
  const R a = { 12 };
  char b[1][a.r] = { { "12345678901" } };
  char c[a.r] = { "12345678901" };
  char d[1][a.r] = { { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
'\0' } };
  char e[a.r] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '\0'
};
  baz (b[0], c, d[0], e);
}

plus perhaps we want a runtime test that checks what happens if the VLA sizes
will be too small.


More information about the Gcc-bugs mailing list