https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828
Campbell <rlcamp.pdx at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rlcamp.pdx at gmail dot com
--- Comment #13 from Campbell <rlcamp.pdx at gmail dot com> ---
I believe I may have hit this in code not using constexpr, not sure if this is
the same bug or not:
#include <stdio.h>
int main(void) {
struct thing {
struct thing * next;
/* if this is a FAM, you get an ICE */
char name[];
};
struct thing * a = &(static struct thing) { .name = "a" };
struct thing * head = a;
for (struct thing * this = head; this; this = this->next)
puts(this->name);
}
Results in an ICE in gcc trunk on godbolt as of this writing, and a segfault in
gcc 13.3 and 14.1