[LLVMbugs] [Bug 23995] New: clang segfaults while doing decltype(auto) with a template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 30 08:53:30 PDT 2015


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

            Bug ID: 23995
           Summary: clang segfaults while doing decltype(auto) with a
                    template
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bloch_j at epita.fr
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14541
  --> https://llvm.org/bugs/attachment.cgi?id=14541&action=edit
The compilation logs

Steps to Reproduce:
$ cat sigsegv.cpp
template <int Arg>
int fun()
{
    return 0;
}

int main()
{
    int tata = 0;
    decltype(auto) a = fun<tata>;
}

$ clang++ -o sigsegv -std=c++11 sigsegv.cpp
# The dump is in attachment.

Actual Results:
clang segfaults

Expected Results:
Fail compilation with an error. (cf gcc behavior in attachment)

Additional information:
Without the decltype or the template, clang does not crash.
The same problem appears compiling with c++ standard >= 0x.

-- 
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/20150630/e0365392/attachment.html>


More information about the llvm-bugs mailing list