http://llvm.org/bugs/show_bug.cgi?id=17584

            Bug ID: 17584
           Summary: -fms-extensions: SEH __try / __except crashes in
                    template instantiation
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified

$ cat t.cpp
template <void proc()>
bool wrapped() {
  bool r = true;
  __try {
    proc();
  } __except(true) {
    r = false;
  }
  return r;
}
void crash() {
  *(volatile int*)0 = 0;
}
int main() {
  wrapped<crash>();
}

$ clang-cl t.cpp -c
Assertion failed: FilterExpr && Block, file
..\tools\clang\lib\Sema\SemaStmt.cpp, line 3147
clang-cl.exe: error: clang frontend command failed with exit code 3 (use -v to
see invocation)
clang::Sema::ActOnSEHExceptBlock()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::RebuildSEHExceptStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHExceptStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHHandler()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHTryStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt()
clang::Sema::SubstStmt()
clang::Sema::InstantiateFunctionDefinition()
clang::Sema::PerformPendingInstantiations()
clang::Sema::ActOnEndOfTranslationUnit()
clang::Parser::ParseTopLevelDecl()
clang::ParseAST()
clang::ASTFrontendAction::ExecuteAction()
clang::CodeGenAction::ExecuteAction()
clang::FrontendAction::Execute()
clang::CompilerInstance::ExecuteAction()
clang::ExecuteCompilerInvocation()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to