https://llvm.org/bugs/show_bug.cgi?id=28962
Bug ID: 28962 Summary: Clang frontend crash with code using base constructors on templated types in a derived class Product: clang Version: 3.8 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: kredu...@yahoo.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Occurs on Windows 10, code and various traces and other files copied below - I tried to attach multiple files, but it seems it'll only let me do one, so I've pasted details in this section. This is the tersest repro I could generate the error from. LLVM installed from http://llvm.org/releases/download.html (Clang for Windows 64-bit). === Crash trace === Assertion failed: Loc.isValid() && "point of instantiation must be valid!", file D:\src\llvm_package_3.8.1-final\llvm\tools\clang\include\clang/AST/DeclTemplate.h, line 1649 0x00007FF7F54CE4F6 (0x0000000000000001 0x00007FF74DC8B64E 0x00007FF70000015C 0x00007FFC71295F47) 0x00007FF7F6DF0CD1 (0x0000000000000001 0x0000000000000000 0x00007FF7F77C6082 0x0000000000000050) 0x00007FF7F6DE9C94 (0x0002000000000050 0x0000000000000000 0x00007FF7F7A01330 0x00007FF7F7899848) 0x00007FF7F6DE63C4 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FF7F6676B63 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FF7F66797B0 (0x000001D7A3F15A70 0x0000000000000000 0x000001D7A5B68A00 0x00007FF7F56EF4DD) 0x00007FF7F658AE16 (0x000001D7A5B68620 0x00007FF7F6DE6BC0 0x000001D7A3F15A70 0x000001D7A3F15A70) 0x00007FF7F6732ADC (0x0000000000000000 0x000000C41FB889E0 0x0000000000000001 0x000001D700000002) 0x00007FF7F67618DA (0x0000000000000000 0x0000000000000000 0x000001D7A3ED90F0 0x000001D7A5B62CF0) 0x00007FF7F672BD9E (0x000001D7A5B68BA0 0x00007FF7F6A0A259 0x000001D7A5B68C70 0x000001D7A5B68BA0) 0x00007FF7F673C83D (0x00007FF7F6530976 0x00007FF7F6E16800 0x000001D7A5B68620 0x000001D7A5B62B00) 0x00007FF7F673BD01 (0x000000C41FB89000 0x000000C41FB88E88 0x000001D7A3F15A98 0x00007FF7F6AA89E9) 0x00007FF7F66D62B8 (0x000000C41FB891C0 0x000001D7A5B623D0 0x000001D7A5B623D0 0x0000000000000000) 0x00007FF7F66C275D (0x000001D7A3ED0390 0x000000C41FB88F90 0x000001D7A5B6A610 0x000000C41FB88F90) 0x00007FF7F66BF975 (0x0000000000000000 0x0000000000000000 0x000001D7A5B6A680 0x0000000000000000) 0x00007FF7F66BEF37 (0x000001D700000000 0x000001D700000000 0x000001D7A5B68620 0x010000C40000011D) 0x00007FF7F63462F5 (0x000001D7A3E70000 0x000001D7A5B62778 0x000001D7A5B68528 0x000001D74A00004A) 0x00007FF7F6344E8F (0x000001D7A5B62288 0x0000000000000000 0x000001D7A3ED0390 0x00007FF7F6A4DB96) 0x00007FF7F6366C21 (0x0000000000000008 0x00007FF7F67BDF53 0x0000000000000000 0x000001D7A5B62288) 0x00007FF7F64E6E91 (0x000001D700000000 0x000001D700000000 0x000001D7A5B62750 0x000001D7A5B62288) 0x00007FF7F636FE71 (0x0000000000000000 0x00007FF7F6A7F412 0x00007FF7F6761696 0x000001D7A3F15A70) 0x00007FF7F66C6A35 (0x0000000000000000 0x0000000000000000 0x000001D7A3EAB190 0x000001D7A3F527E0) 0x00007FF7F630821C (0x00007FF7F60C0660 0x00007FF7F60BFA7F 0x000001D7A3ED90F0 0x000001D7A5B6A0D8) 0x00007FF7F60B6D67 (0x000001D7A3ED90F0 0x000000C41FB8D550 0x0000000000000001 0x0000000000000000) 0x00007FF7F60B4A1D (0x000000C41FB8DB58 0x000000C41FB8DB70 0x000001D7A5B69670 0x000001D7A3EAB350) 0x00007FF7F60707B1 (0x000001D700CCB100 0x0000000000000018 0x000000010000004C 0x000001D7A3EABAB8) 0x00007FF7F607018F (0x0000000000000000 0x00007FF7F789E5DE 0x000000000000000A 0x00007FF7F789E5D0) 0x00007FF7F606EF47 (0x000001D7A3EAB190 0x000001D7A3F15A70 0x000001D700000000 0x00007FF700000000) 0x00007FF7F606E261 (0x000001D7A3E9FA98 0x000001D7A3EA7E98 0x00007FF700000000 0x0000000000000000) 0x00007FF7F606ABC6 (0x00007FF7F76FE922 0x000001D7A3E76960 0x000001D7A3E9CB10 0x000001D7A3E9CB40) 0x00007FF7F5AB5C3D (0x00007FF7F76FE878 0x0000000000000005 0x000001D7A3E9FA98 0x0000000000000001) 0x00007FF7F5A69411 (0x00007FF7F41C6770 0x00007FF7F6DE6C37 0x0000000000000028 0x000001D7A3EA1510) 0x00007FF7F5AFA174 (0x0000000000000000 0x0000000000000000 0x000001D7A3EA5000 0x0000000000000001) 0x00007FF7F41C6622 (0x0000000000000001 0x000000C41FB8EA48 0x0000000000001000 0x000001D700000004) 0x00007FF7F41C4A86 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FF7F6DE78B0 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FFC70648364 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s) 0x00007FFC71295E91 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s) clang++.exe: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.8.1 (branches/release_38) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\LLVM\bin === Code that crashes (main.cpp) === //command line: clang++ -std=c++11 main.cpp template <typename T> struct foo {}; template <typename T> struct bar {}; template <typename T> struct base { base(foo<T>); base(bar<T>); }; struct derived : base<int> { using base<int>::base; }; derived d = foo<int>(); === main-7c552b.cpp === # 1 "<built-in>" # 1 "main.cpp" //command line: clang++ -std=c++11 main.cpp template <typename T> struct foo {}; template <typename T> struct bar {}; template <typename T> struct base { base(foo<T>); base(bar<T>); }; struct derived : base<int> { using base<int>::base; }; derived d = foo<int>(); === main-7c552b.sh === # Crash reproducer for clang version 3.8.1 (branches/release_38) # Driver args: "--driver-mode=g++" "-std=c++11" "main.cpp" # Original command: "C:\\Program Files\\LLVM\\bin\\clang++.exe" "-cc1" "-triple" "x86_64-pc-windows-msvc18.0.0" "-emit-obj" "-mrelax-all" "-mincremental-linker-compatible" "-disable-free" "-main-file-name" "main.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-momit-leaf-frame-pointer" "-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir" "C:\\Program Files\\LLVM\\bin\\..\\lib\\clang\\3.8.1" "-internal-isystem" "C:\\Program Files\\LLVM\\bin\\..\\lib\\clang\\3.8.1\\include" "-internal-isystem" "C:/Program Files/Microsoft Visual Studio 10.0/VC/include" "-internal-isystem" "C:/Program Files/Microsoft Visual Studio 9.0/VC/include" "-internal-isystem" "C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include" "-internal-isystem" "C:/Program Files/Microsoft Visual Studio 8/VC/include" "-internal-isystem" "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include" "-std=c++11" "-fdeprecated-macro" "-fdebug-compilation-dir" "E:\\coding\\cpp\\result\\clang_crash" "-ferror-limit" "19" "-fmessage-length" "120" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=18" "-fno-threadsafe-statics" "-fdelayed-template-parsing" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-o" "C:\\Users\\kreducer\\AppData\\Local\\Temp\\main-69572f.o" "-x" "c++" "main.cpp" "C:\\Program Files\\LLVM\\bin\\clang++.exe" "-cc1" "-triple" "x86_64-pc-windows-msvc18.0.0" "-emit-obj" "-mrelax-all" "-mincremental-linker-compatible" "-disable-free" "-main-file-name" "main.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-momit-leaf-frame-pointer" "-dwarf-column-info" "-debugger-tuning=gdb" "-std=c++11" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "120" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=18" "-fno-threadsafe-statics" "-fdelayed-template-parsing" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c++" "main-7c552b.cpp" -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs