https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277
Bug ID: 85277 Summary: [8 Regression] Broken diagnostic for offsetof with static member function Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The testcase gcc/testsuite/g++.dg/ext/offsetof1.C produces a broken diagnostic on trunk: offsetof1.C:15:50: error: cannot apply 'offsetof' to member function '#'indirect_ref' not supported by dump_decl#<declaration error>' The offending problem can be reduced to: ====================================================== struct bar { static int baz(); }; int bv0 = __builtin_offsetof(volatile bar, baz[0]); ====================================================== The regression was introduced between 2017-11-09 and 2017-11-17.