<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compliler crash."
   href="https://llvm.org/bugs/show_bug.cgi?id=25586">25586</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compliler crash.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vmuravyev@alfabank.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compiler crashes during compliation of code with a lot of templates.

The same code successfully compiles by the clang 3.6

Crash backtrace:

0  libLLVM.so.3.7  0x00007f6361853228
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  libLLVM.so.3.7  0x00007f6361852041
2  libpthread.so.0 0x00007f63610e4d60
3  clang-3.7       0x00000000013855b8 clang::Expr::IgnoreParens() + 8
4  clang-3.7       0x000000000138630d clang::Expr::IgnoreParenImpCasts() + 13
5  clang-3.7       0x0000000000deb52f
6  clang-3.7       0x0000000000e01dd4
7  clang-3.7       0x0000000000e052a8
clang::Sema::ActOnCXXDelete(clang::SourceLocation, bool, bool, clang::Expr*) +
280
8  clang-3.7       0x0000000000fa98cd
9  clang-3.7       0x0000000000fa58e9
10 clang-3.7       0x0000000000fb442d
11 clang-3.7       0x0000000000fb56fb
12 clang-3.7       0x0000000000fb583b
13 clang-3.7       0x0000000000fb4755
14 clang-3.7       0x0000000000fb7f8f clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 95
15 clang-3.7       0x0000000000fcc2e1
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 3745
16 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
17 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
18 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
19 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
20 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
21 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
22 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
23 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
24 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
25 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
26 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
27 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
28 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
29 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
30 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
31 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
32 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
33 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
34 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
35 clang-3.7       0x0000000000fcbf87
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2887
36 clang-3.7       0x0000000000fcc5fa
clang::Sema::PerformPendingInstantiations(bool) + 314
37 clang-3.7       0x0000000000c423e5 clang::Sema::ActOnEndOfTranslationUnit()
+ 341
38 clang-3.7       0x0000000000ac2a09
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 601
39 clang-3.7       0x0000000000ab6fa3 clang::ParseAST(clang::Sema&, bool, bool)
+ 499
40 clang-3.7       0x0000000000908b06 clang::FrontendAction::Execute() + 502
41 clang-3.7       0x00000000008e2e79
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 313
42 clang-3.7       0x0000000000982624
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1940
43 clang-3.7       0x0000000000652958 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2280
44 clang-3.7       0x000000000064db7b main + 1003
45 libc.so.6       0x00007f63607b8610 __libc_start_main + 240
46 clang-3.7       0x0000000000650839 _start + 41
Stack dump:
0.    Program arguments: /usr/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name Main.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -g
-dwarf-column-info -coverage-file
/home/vmuravyev/.CLion12/system/cmake/generated/8459f751/8459f751/Debug/CMakeFiles/clang_crash.dir/Main.cpp.o
-resource-dir /usr/bin/../lib/clang/3.7.0 -internal-isystem
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/x86_64-unknown-linux-gnu
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.7.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir
/home/vmuravyev/.CLion12/system/cmake/generated/8459f751/8459f751/Debug
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/clang_crash.dir/Main.cpp.o -x c++
/home/vmuravyev/dev/clang_crash/test/Main.cpp 
1.    <eof> parser at end of file
2.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:1245:5:
instantiating function definition 'BusinessTransport'
3.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:1757:10:
instantiating function definition 'OnTimer'
4.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:1881:10:
instantiating function definition 'SendHeartbeat'
5.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:989:10:
instantiating function definition 'Send'
6.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:199:10:
instantiating function definition 'Send'
7.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:264:17:
instantiating function definition 'ProcessWrite'
8.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:316:10:
instantiating function definition 'Shutdown'
9.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:290:17:
instantiating function definition 'ProcessShutdown'
10.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:307:17:
instantiating function definition 'ProcessClose'
11.    /home/vmuravyev/dev/clang_crash/test/LibuvTestInterfaces.hpp:18:10:
instantiating function definition 'ProcessDisconnect'
12.    /home/vmuravyev/dev/clang_crash/test/LibuvTestWrapper.hpp:1072:10:
instantiating function definition 'ProcessDisconnect'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix


*.sh:

# Crash reproducer for clang version 3.7.0 (tags/RELEASE_370/final)
# Driver args: "--driver-mode=g++" "-std=c++11" "-g" "-o"
"CMakeFiles/clang_crash.dir/Main.cpp.o" "-c"
"/home/vmuravyev/dev/clang_crash/test/Main.cpp"
# Original command:  "/usr/bin/clang-3.7" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-main-file-name" "Main.cpp" "-mrelocation-model"
"static" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array"
"-target-cpu" "x86-64" "-g" "-dwarf-column-info" "-coverage-file"
"/home/vmuravyev/.CLion12/system/cmake/generated/8459f751/8459f751/Debug/CMakeFiles/clang_crash.dir/Main.cpp.o"
"-resource-dir" "/usr/bin/../lib/clang/3.7.0" "-internal-isystem"
"/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0"
"-internal-isystem"
"/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/x86_64-unknown-linux-gnu"
"-internal-isystem"
"/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/backward"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/bin/../lib/clang/3.7.0/include" "-internal-externc-isystem" "/include"
"-internal-externc-isystem" "/usr/include" "-std=c++11" "-fdeprecated-macro"
"-fdebug-compilation-dir"
"/home/vmuravyev/.CLion12/system/cmake/generated/8459f751/8459f751/Debug"
"-ferror-limit" "19" "-fmessage-length" "0" "-mstackrealign"
"-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-o"
"CMakeFiles/clang_crash.dir/Main.cpp.o" "-x" "c++"
"/home/vmuravyev/dev/clang_crash/test/Main.cpp"
 "/usr/bin/clang-3.7" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj"
"-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-main-file-name"
"Main.cpp" "-mrelocation-model" "static" "-mthread-model" "posix"
"-mdisable-fp-elim" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-g"
"-dwarf-column-info" "-std=c++11" "-fdeprecated-macro" "-ferror-limit" "19"
"-fmessage-length" "0" "-mstackrealign" "-fobjc-runtime=gcc" "-fcxx-exceptions"
"-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c++"
"Main-66ec29.cpp"</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>