This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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].

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]