[llvm-bugs] [Bug 47192] New: Crash when passing pointer of function's static data as template argument

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 16 16:49:49 PDT 2020


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

            Bug ID: 47192
           Summary: Crash when passing pointer of function's static data
                    as template argument
           Product: clang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lepesme.jb at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Hi,

I tried to reduce this to a minimal case here: https://godbolt.org/z/36co5a

Similar cases where I can't repro the crash:
- compile with std c++98, 11 or 14 (crash for 17, 20, 2a).
- Having data0 in class bar, or in global scope
- bar without template
- move bar ctor to a free function without template

Moving bar ctor to a free function with template gets a linker error:
https://godbolt.org/z/46Ecef

Bye,
JB.

-- 
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/20200816/3721e93d/attachment.html>


More information about the llvm-bugs mailing list