http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46552
Summary: Internal compiler error on pointer to member variable with template Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: fl...@flast.jp The compiler says: test.cpp: In function ‘void f()’: test.cpp:9:9: internal compiler error: unexpected expression ‘S::x’ of kind offset_ref Please submit a full bug report, with preprocessed source if appropriate. I compiled following code with "g++ 4.6.0 20101110". But "g++ 4.6.0 20101102" does not report this error. struct S { int x; }; template < typename > void f( void ) { &S::x; }