[llvm-bugs] [Bug 42936] New: SegFault with __builtin_bit_cast to templated type and auto return type

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 8 10:21:22 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: Roland.Schulz at Intel.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190808/30443bfd/attachment.html>


More information about the llvm-bugs mailing list