// PR c++/24560

struct A { void f(); };
void g() { A().f.a; } // { dg-error "class" }


syntax highlighted by Code2HTML, v. 0.9.1