Hi, I'm committing as obvious the testcase and closing the PR as fixed for 4.7.
Thanks, Paolo. /////////////////////
2011-09-25 Paolo Carlini <paolo.carl...@oracle.com> PR c++/50280 * g++.dg/template/bitfield1.C: New.
Index: g++.dg/template/bitfield1.C =================================================================== --- g++.dg/template/bitfield1.C (revision 0) +++ g++.dg/template/bitfield1.C (revision 0) @@ -0,0 +1,11 @@ +// PR c++/50280 + +struct S { int bf : 3; }; + +template<class _T1> +void make_pair(_T1& __x) {} + +void foo() { + const S s = S(); + make_pair(s.bf); +}