This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83808] [7/8 Regression] "internal compiler error" for invalid input
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Jan 2018 11:35:51 +0000
- Subject: [Bug c++/83808] [7/8 Regression] "internal compiler error" for invalid input
- Auto-submitted: auto-generated
- References: <bug-83808-4@http.gcc.gnu.org/bugzilla/>
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].