template<class T> struct S { int x;}; auto f() { int t = 5; return __builtin_bit_cast(S<int>, t); } Error: 1. <source>:8:41: current parser token ';' 2. <source>:6:10: parsing function body 'f' 3. <source>:6:10: in compound statement ('{}') #4 0x0000557591fc2a05 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/opt/compiler-explorer/clang-trunk-20190808/bin/clang-10+0x47d8a05) clang-10: error: unable to execute command: Segmentation fault (core dumped) https://godbolt.org/z/4sPmp2
Reduced slightly: template<class T> struct S { int x;}; S<int> x = __builtin_bit_cast(S<int>, 0); Looks like we're missing a RequireCompleteType call?
Fixed in 368600.