// { dg-do assemble } template class B { public: A a; }; static B b_int; static B b_char; int foo () { return b_int.a + b_char.a; }