[llvm-bugs] [Bug 41677] New: [clang-cl] ICE instantiating variable template in virtual function with /Zi

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 30 15:38:51 PDT 2019


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

            Bug ID: 41677
           Summary: [clang-cl] ICE instantiating variable template in
                    virtual function with /Zi
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Casey at Carter.net
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 21854
  --> https://bugs.llvm.org/attachment.cgi?id=21854&action=edit
Repro files (.cpp & .sh)

Compiling this well-formed program:

    template<class, class> constexpr bool is_same_v = false;
    template<class T> constexpr bool is_same_v<T, T> = true;

    struct codecvt {
    #ifndef WORKAROUND
        virtual bool do_always_noconv() const {
            return is_same_v<char, char>;
        }
    #else
        static constexpr bool foo = is_same_v<char, char>;
        virtual bool do_always_noconv() const {
            return foo;
        }
    #endif
    };

    int main() {
        (void) codecvt{};
    }

with "clang-cl /Zi" outputs:

    C:\Users\cacarter\Downloads>clang-cl /Zi repro.cpp
    0x00007FF71A5485A0 (0x000001B2E03494F8 0x000001B2E02ED650
0x00007E9B1AC874D6 0x000001B2E037A460)
    0x00007FF71BF495C9 (0x0000000000000000 0x0000000000000000
0x000001B2E02EE310 0x000001B2E027F618)
    0x00007FF71A0D4786 (0x000001B2E01302A8 0x00007FF9B449C44F
0x0000000000000020 0x000001B2E0130CC0)
    0x00007FF71A168CF3 (0x000001B2E0230000 0x00007FF9B449B9A7
0x000001B2E0130000 0x000001B200000000)
    0x00007FF71A74185F (0x000000297E189B01 0x000000297E18A840
0x00007E9B1AC87956 0x000001B2E037CE90)
    0x00007FF71A742116 (0x0000000000000000 0xFFFFFFFFFFFFFFFF
0x0000000000000000 0xFFFFFFFFFFFFFFFF)
    0x00007FF71A74EC94 (0x0000000000000000 0x000000297E18A840
0x000001B2E0349CB0 0x00007FF71A74D02E)
    0x00007FF71A88CEF9 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x00007FF71A0E50B6)
    0x00007FF71A9A1CAD (0x000001B2E02B8A80 0x000001B2E0130000
0x000001B2E01302AC 0x00007FF71A6CD59F)
    0x00007FF71A9A9104 (0x0000000000000000 0x000001B2E03799DA
0x000001B2E03799D8 0x00007FF71A0D4981)
    0x00007FF71A996ECE (0x0000000000000000 0x000001B2E02B7748
0x0000000000000000 0x00007FF71A143588)
    0x00007FF71A94920A (0x000001B2E0349BA1 0x0000000000000008
0x00000000000000AF 0x00007FF71BCAAE46)
    0x00007FF71A9460B1 (0x000001B2E0349D28 0x000001B200000000
0x0000000000000006 0x00007FF9B449C44F)
    0x00007FF71A94EDC5 (0x000001B2E0349D28 0x00007FF71A8B4742
0x000001B2E0349D28 0x00000000000000AF)
    0x00007FF71A874D7E (0x00007E9B1AC84466 0x000001B2E0349D28
0x00000000000000AF 0x000001B2E02AE620)
    0x00007FF71A8756A9 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000)
    0x00007FF71A703BBD (0x00000000E02B6B01 0x000001B2E0349D28
0x000001B2E02AE620 0x000001B2E0281D70)
    0x00007FF71A6FDA60 (0x000000297E18BFA0 0x000001B2E029C5F0
0x000001B2E0281C00 0x00007FF71A6FD850)
    0x00007FF71A6F5390 (0x000001B2E02B1835 0x000000297E18C090
0x000001B2E02B1836 0x000000297E18BF88)
    0x00007FF71A6F53B8 (0x000001B2E0358B08 0x000001B2E0321030
0x000001B40000018F 0x0000000000000008)
    0x00007FF71A6F4521 (0x00007E9B1AC82136 0x000000297E18D7A8
0x00007E9B1AC83776 0x000000297E18D7A8)
    0x00007FF71C11FF65 (0x0000000000000000 0x00007FF71C120295
0x00007E9B1AC82166 0x000000297E18D7A8)
    0x00007FF71C11E1E4 (0x000001B2E025E6B0 0x00007FF71AB378AA
0x0000000000000009 0x000001B200000013)
    0x00007FF71B5742B3 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x000001B2E0238B60)
    0x00007FF71AB76B3D (0x00000000000000C0 0x0000002DE02B3ED0
0x000001B2E0238B60 0x000001B2E027B740)
    0x00007FF71AB3A897 (0x000000297E18DC01 0x0000000000000000
0x0000000000000000 0x0000000000000049)
    0x00007FF71ABC80A8 (0x000001B2E028A1B0 0x0000000000000001
0x0000000000000047 0x000001B2E0230000)
    0x00007FF719096BBC (0x00000000FD0000FD 0x00000000000000FD
0x0000000002000002 0x00000000000006B0)
    0x00007FF7190941D7 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000)
    0x00007FF71C1247B0 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000)
    0x00007FF9B3BD7BD4 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
    0x00007FF9B44CCE71 (0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
    clang-cl: error: clang frontend command failed due to signal (use -v to see
invocation)
    clang version 8.0.0 (tags/RELEASE_800/final)
    Target: x86_64-pc-windows-msvc
    Thread model: posix
    InstalledDir: c:\Program Files\LLVM\bin
    clang-cl: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
    clang-cl: note: diagnostic msg:
    ********************

    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang-cl: note: diagnostic msg:
C:\Users\cacarter\AppData\Local\Temp\repro-687e9c.cpp
    clang-cl: note: diagnostic msg:
C:\Users\cacarter\AppData\Local\Temp\repro-687e9c.sh
    clang-cl: note: diagnostic msg:

    ********************

Compiling with "WORKAROUND" defined succeeds.

-- 
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/20190430/71b5cbcf/attachment-0001.html>


More information about the llvm-bugs mailing list