https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86622
--- Comment #3 from U.Mutlu <um at mutluit dot com> ---
I just tested it with v9:
#include <stdio.h>
static const char a[3][8] = { "1234", "12345", "123456" };
int main ()
{
volatile int i = 1;
const char* p = *(&a[1] + i);
int n = __builtin_strlen (p);
printf("p=%s n=%d\n", p, n); // p=123456 n=6
if (n != 6)
__builtin_abort ();
}
Hmm. I would have expected something different, along the lines of
p=&a[1][1]...
The question is, which result is correct?