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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Here's another test case with structs.

const struct {
  char a[4];
} a[] = { { "0" }, { "01" } };

const struct {
  char a[5];
} b[][2] = { { { "0" }, { "01" } }, { { "012" }, { "0123" } } };

void f (void)
{
  if (__builtin_strlen (a[1].a) != 2)
    __builtin_abort ();
}

void g (void)
{
  if (__builtin_strlen (b[1][1].a) != 4)
    __builtin_abort ();
}

Reply via email to