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

            Bug ID: 48465
           Summary: Compiler crashes due to incorrect template pack syntax
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: dbron...@go.olemiss.edu
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Created attachment 24257
  --> https://bugs.llvm.org/attachment.cgi?id=24257&action=edit
Crash synopsis including tmp files (sh and cpp), original run script, and stack
dump

Overview: When an unexpected, unexpanded parameter pack is encountered in the
template arguments of a concept, the compiler crashes.

Steps to Reproduce: Attempt to compile the following with clang++-10
-std=c++20:

=======================Begin Sample============================

template<typename... Ts>
concept test = requires{sizeof...(Ts);};//trivially true

template<typename... Ts>
requires test<Ts>
struct Test{};

int main()
{
        Test<>;
        return 0;
}

=======================End Sample==============================

Actual Result: The compiler crashes with a seg fault

Expected Result: A syntax error message about an unexpected parameter pack

Build Data & Hardware: 2020 December 9th on Ubuntu 20.04.1 LTS with kernel
5.4.0-56-generic

-- 
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