https://bugs.llvm.org/show_bug.cgi?id=42936

            Bug ID: 42936
           Summary: SegFault with __builtin_bit_cast to templated type and
                    auto return type
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: roland.sch...@intel.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to