Comment 2 for bug 475450

Revision history for this message
Andy Whitcroft (apw) wrote : Re: gcc-4.4 4.4.2-1ubuntu2 offfsetof seems to trigger "internal compiler error: Segmentation fault"

Ok I have managed to reduce this to a sensible reproduce by as below:

$ cat X.c
struct foo {
        unsigned long foo_A;
        int foo_B[];
};

void bar()
{
        __builtin_offsetof(typeof(struct foo), foo_B[2]);
}

$ gcc-4.4 -c X.c
X.c: In function 'bar':
X.c:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.