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

            Bug ID: 51872
           Summary: Segmentation fault when working with templates and
                    c++20
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Created attachment 25261
  --> https://bugs.llvm.org/attachment.cgi?id=25261&action=edit
code which reproduces the segfault if compiled with -std=c++20

I was integrating a c++20 metaprogramming library in a large codebase when I
started getting segmentation faults from clang whereas gcc was compiling fine. 

For legal reasons I am not able to submit the preproccessed source code so I
tried to use creduce (from: https://embed.cs.utah.edu/creduce/) to reduce the
reproduction scenario to something I can submit. 
Somewhere during the automated reduction process the code got turned into
invalid c++, but the segmentation fault is still there so hopefully the root
cause is still the same.

The reduced source can be found here: https://godbolt.org/z/qzbcaredj (also
added as attachment)

The segmentation fault occurs in clang-10 and later (up to and including
trunk). It seems the segfault only occurs when compiling with c++20 enabled
through the use of the -std=c++20 flag.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to