<html>
    <head>
      <base href="http://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 --- - Assertion failed (clang.exe) connected with exceptions."
   href="http://llvm.org/bugs/show_bug.cgi?id=22305">22305</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed (clang.exe) connected with exceptions.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andrey.kuleshov@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13725" name="attach_13725" title="attached files example1-6cc281.cpp example1-6cc281.sh">attachment 13725</a> <a href="attachment.cgi?id=13725&action=edit" title="attached files example1-6cc281.cpp example1-6cc281.sh">[details]</a></span>
attached files example1-6cc281.cpp example1-6cc281.sh

example1.cpp: 

#include <iostream>
int main () {
std::cout << "PASS";
return 0;
}

===================HOW TO REPRODUCE==============
$ ./clang.exe -D_HAS_EXCEPTIONS=0 -m64 example1.cpp


===================ANALYSYS======================
clang-cl.exe compilates such code correctly.

Error is connected with exceptions handling. 
Error appeared after using clang with macro -D_HAS_EXCEPTIONS=0 (this option
helps to compile VS headers while try{ is not allowed).

===================ERROR===========================
Assertion failed: LPad->TypeIds.size() == LPad->ClauseLabels.size(), file
D:\users\akulesho\my_workspaces\native_clang\llvm\lib\CodeGen\AsmPrinter\Win64Exception.cpp,
line 224
Stack dump:
0.      Program arguments:
d:\users\akulesho\my_workspaces\native_clang\build\Debug\bin\clang.exe -cc1
-triple x86_64-pc-windows-msvc -emit-obj -mrelax-all -disable-free
-main-file-name example1.cpp -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -dwarf-column-info -resource-dir d:\users\
akulesho\my_workspaces\native_clang\build\Debug\bin\..\lib\clang\3.7.0 -D
_HAS_EXCEPTIONS=0 -internal-isystem
d:\users\akulesho\my_workspaces\native_clang\build\Debug\bin\..\lib\clang\3.7.0\include
-internal-isystem
d:/users/akulesho/my_workspaces/xmain/deploy/win_debug/compiler/include
-internal-isystem c:/Program files (x86)/Microsoft Visual Studio
11.0/VC/include -internal-isystem c:/Program fi
les (x86)/Microsoft Visual Studio 11.0/VC/atlmfc/include -internal-isystem
c:/Program files (x86)/Windows Kits/8.0/include/shared -internal-isystem
c:/Program files (x86)/Windows Kits/8.0/include/um -internal-isystem c:/Program
files (x86)/Windows Kits/8.0/include/winrt -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir
d:\users\akulesho\my_workspaces\native_clang\build\Debug\bin -ferror-limit
19 -fmessage-length 400 -mstackrealign -fms-extensions -fms-compatibility
-fms-compatibility-version=17.00 -fdelayed-template-parsing -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
C:\Users\akulesho\AppData\Local\Temp\3\example1-05765f.o -x c++ example1.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'example1.cpp'.
4.      Running pass 'X86 Assembly / Object Emitter' on function
'@"\01?equivalent@error_category@std@@UEBA_NAEBVerror_code@2@H@Z"'
0x57DAA16A (0x0000000A 0x00000000 0x00B7D648 0x57E84074), exit() + 0x13A
bytes(s)
0x57E947BC (0x00B7DD80 0x00B7D65C 0x000000B0 0x00B7D810), abort() + 0x1C
bytes(s)
0x57E84074 (0x05C4E360 0x05C4E2A8 0x000000E0 0x00B7DF64), _wassert() + 0xD4
bytes(s)
0x0284B3B5 (0x00B7DDB0 0x08B6FD78 0x00000014 0xCCCCCCCC),
llvm::Win64Exception::emitCSpecificHandlerTable() + 0x445 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\codegen\asmprinter\win64exception.cpp,
line 224 + 0x39 byte(s)
0x0284BAE1 (0x08C0EDA8 0x00B7E000 0x00B7DF6C 0xCCCCCCCC),
llvm::Win64Exception::endFunction() + 0x121 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\codegen\asmprinter\win64exception.cpp,
line 111
0x02807DF5 (0x00B7DF88 0x00000002 0x00CCCCCC 0x08C0EC90),
llvm::AsmPrinter::EmitFunctionBody() + 0x7D5 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\codegen\asmprinter\asmprinter.cpp,
line 886 + 0x20 byte(s)
0x018C97CA (0x08C0EDA8 0x00B7DFA0 0x08C0EDA8 0x08C0EC90),
llvm::X86AsmPrinter::runOnMachineFunction() + 0x10A bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\target\x86\x86asmprinter.cpp,
line 71
0x01CA67F0 (0x083AB4B0 0x00B7E0F8 0x00B7E03C 0x00000001),
llvm::MachineFunctionPass::runOnFunction() + 0x50 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\codegen\machinefunctionpass.cpp,
line 33 + 0x13 byte(s)
0x01EEBBE5 (0x083AB4B0 0x00000000 0xCCCCCCCC 0x00E3A8A4),
llvm::FPPassManager::runOnFunction() + 0x105 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\ir\legacypassmanager.cpp,
line 1530 + 0x17 byte(s)
0x01EEBD75 (0x00E3A8D0 0x00B7E240 0x00B7E104 0x00000000),
llvm::FPPassManager::runOnModule() + 0x75 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\ir\legacypassmanager.cpp,
line 1550 + 0x15 byte(s)
0x01EECCE9 (0x00E3A8D0 0x00B7E34C 0x7EFDE000 0xCCCCCCCC), `anonymous
namespace'::MPPassManager::runOnModule() + 0x1C9 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\ir\legacypassmanager.cpp,
line 1608 + 0x17 byte(s)
0x01EED381 (0x00E3A8D0 0x08BB3698 0x00B7E240 0x02A4F173),
llvm::legacy::PassManagerImpl::run() + 0x101 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\ir\legacypassmanager.cpp,
line 1715 + 0x1B byte(s)
0x01EE7F8D (0x00E3A8D0 0x00B7E320 0x00B7E34C 0xCCCCCCCC),
llvm::legacy::PassManager::run() + 0x1D bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\lib\ir\legacypassmanager.cpp,
line 1749
0x02A4F173 (0x00000005 0x00DFA0E0 0x00B7E398 0x00B7E34C), `anonymous
namespace'::EmitAssemblyHelper::EmitAssembly() + 0x303 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\codegen\backendutil.cpp,
line 635
0x02A4D6E3 (0x00E05A18 0x00DFF080 0x00DFCD28 0x00DFCC08),
clang::EmitBackendOutput() + 0x53 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\codegen\backendutil.cpp,
line 650
0x02A3362C (0x00E2D470 0x00B7E628 0x00B7E438 0x00E56EE0),
clang::BackendConsumer::HandleTranslationUnit() + 0x21C bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\codegen\codegenaction.cpp,
line 176 + 0x55 byte(s)
0x0340417A (0x07E50068 0x00000000 0x00000000 0x00B7E630), clang::ParseAST() +
0x23A bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\parse\parseast.cpp,
line 151 + 0x18 byte(s)
0x026EFFC1 (0x00B7E6AC 0x00B7E630 0xCCCCCCCC 0xCCCCCCCC),
clang::ASTFrontendAction::ExecuteAction() + 0x101 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\frontend\frontendaction.cpp,
line 527 + 0x30 byte(s)
0x02A2FC7D (0x00B7E658 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC),
clang::CodeGenAction::ExecuteAction() + 0x3CD bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\codegen\codegenaction.cpp,
line 728
0x026EFBAE (0x00B7E750 0x00000000 0xCCCCCCCC 0xCCCCCCCC),
clang::FrontendAction::Execute() + 0x7E bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\frontend\frontendaction.cpp,
line 428 + 0xF byte(s)
0x026AB101 (0x00DF1C20 0x00B7EC58 0x00000000 0xCCCCCCCC),
clang::CompilerInstance::ExecuteAction() + 0x2A1 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\frontend\compilerinstance.cpp,
line 812
0x02800F0C (0x00DFCB40 0x00B7FA04 0xCCCCCCCC 0xCCCCCCCC),
clang::ExecuteCompilerInvocation() + 0x30C bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp,
line 222 + 0x11 byte(s)
0x01179182 (0x00B7F5EC 0x0000003E 0x00DFFCF8 0x01161389), cc1_main() + 0x302
bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\tools\driver\cc1_main.cpp,
line 110 + 0xE byte(s)
0x01165D58 (0x00B7F5E4 0x00000040 0x00DFFD43 0x00000000), ExecuteCC1Tool() +
0x78 bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\tools\driver\driver.cpp,
line 369 + 0x2B byte(s)
0x011660F9 (0x00000040 0x00DFC440 0x00DF7370 0x9C361F35), main() + 0x2F9
bytes(s),
d:\users\akulesho\my_workspaces\native_clang\llvm\tools\clang\tools\driver\driver.cpp,
line 415 + 0x33 byte(s)
0x043410C9 (0x00B7FA68 0x75FA338A 0x7EFDE000 0x00B7FAA8), __tmainCRTStartup() +
0x199 bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c, line 536 +
0x19 byte(s)
0x0434120D (0x7EFDE000 0x00B7FAA8 0x77BE9F72 0x7EFDE000), mainCRTStartup() +
0xD bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c, line 377
0x75FA338A (0x7EFDE000 0xE90A43EF 0x00000000 0x00000000), BaseThreadInitThunk()
+ 0x12 bytes(s)
0x77BE9F72 (0x04341200 0x7EFDE000 0xFFFFFFFF 0x77C77428),
RtlInitializeExceptionChain() + 0x63 bytes(s)
0x77BE9F45 (0x04341200 0x7EFDE000 0x00000000 0x00000000),
RtlInitializeExceptionChain() + 0x36 bytes(s)
clang.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk)
Target: x86_64-pc-windows-msvc
Thread model: posix
clang.exe: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.exe: note: diagnostic msg:
C:\Users\akulesho\AppData\Local\Temp\3\example1-6cc281.cpp
clang.exe: note: diagnostic msg:
C:\Users\akulesho\AppData\Local\Temp\3\example1-6cc281.sh
clang.exe: note: diagnostic msg:

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

==========================================================================

Intel Compiler Engineer, 
Andrey Kuleshov</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>