The C++ file: struct bar { static int foo; };
int a = __builtin_offsetof(bar, foo); The error: > g++ -c foo.cc foo.cc:5: internal compiler error: in fold_offsetof_1, at c-common.c:5998 GCC snapshot version: g++ (GCC) 4.1.1 20060512 (prerelease) -- Summary: ICE (in fold_offsetof_1, at c-common.c:5998) on strange offsetof Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrik dot hagglund at bredband dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27601