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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to