Pointer types are supposed to fit on the architecture registers, so it should be reasonably safe to assume they're safe for named registers. The code below asserts on Clang (Bad register type): struct p4_Thread { struct { int len } word }; register struct p4_Thread *p4TH asm("%r15"); fn1() { (*p4TH).word.len; } Not only we could add support for pointer types, but we *must* not assert on bad register types. We should have an error on SemaDecl before it gets to CGExpr, by checking the type of the register variable and emitting a proper error. Once this is accepted by Clang, it will fail on LLVM, since "%r15" is not in the list of registers accepted. But that's a separate problem.
Fixed on r210274