[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 11:35:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83808
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly adjusted testcase:
struct R { int r; };
void
foo ()
{
const R a = { 12 };
char b[1][a.r] = { { "12345678901" } };
char c[a.r] = { "12345678901" };
}
It isn't enough to just comment out the assertion, for c we generate runtime
code to check that the string fits in, but not for b[0].
More information about the Gcc-bugs
mailing list