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

            Bug ID: 45207
           Summary: Crash on invalid recursive variadic template struct
                    definition
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: ryan_greenbl...@brown.edu
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

I have filed the same bug on github here:
https://github.com/llvm/llvm-project/issues/181, but I am posting here for
completeness.

This happens with 10 rc2/rc3 and latest dev built from source.

This is a pretty minimal reproduction:
```
template <char First, char... Rest> struct Recursive {
  using next = typename Recursive<Rest...>::type;
  using type = notdefined<next::anything>;
};
```

Build with `clang++ -std=c++2a test.cpp`
It doesn't crash with `-std=c++17`

I made a docker container which reproduces the issue:
https://hub.docker.com/r/greenblattryan/clang-crash-recursive-template.

Backtrace: https://github.com/llvm/llvm-project/files/4333084/backtrace.txt

Here is a zip with the backtrace, preprocessed source and associated run
script.
https://github.com/llvm/llvm-project/files/4333081/bug-report.zip

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