[LLVMbugs] [Bug 20619] New: Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated), function isNothrow, file /Users/ldionne/code/llvm/tools/clang/lib/AST/Type.cpp, line 1699.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 11 11:17:57 PDT 2014


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

            Bug ID: 20619
           Summary: Assertion failed: (EST != EST_Unevaluated && EST !=
                    EST_Uninstantiated), function isNothrow, file
                    /Users/ldionne/code/llvm/tools/clang/lib/AST/Type.cpp,
                    line 1699.
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldionne.2 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12878
  --> http://llvm.org/bugs/attachment.cgi?id=12878&action=edit
Exact command line

Hi,

The following code triggers an assertion during the code generation with
Clang r215330:

------------------------------------------------------------------------------
    #include <boost/fusion/container/list.hpp>

    int main() {
        boost::fusion::list<int> x{1};
        (void)[x](auto) { };
    }
------------------------------------------------------------------------------

Note that while I was able to track down the bug to this small example, it
still requires boost::fusion::list. I was not able to make it more minimal
because boost::fusion::list's implementation is complicated and the bug seems
to be strongly related to it.

The error message is:
------------------------------------------------------------------------------
› ~/code/llvm/build/bin/clang++ -std=c++1y -o/dev/null
~/desktop/bugreports/llvm_assert_fusion_list/worksheet.cpp
Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated),
function isNothrow, file /Users/ldionne/code/llvm/tools/clang/lib/AST/Type.cpp,
line 1699.
0  clang-3.5                0x0000000107eb324e
llvm::sys::PrintStackTrace(__sFILE*) + 46
1  clang-3.5                0x0000000107eb355b
PrintStackTraceSignalHandler(void*) + 27
2  clang-3.5                0x0000000107eb38ec SignalHandler(int) + 412
3  libsystem_platform.dylib 0x00007fff8b1ed5aa _sigtramp + 26
4  libsystem_platform.dylib 0x00007fff595d8930 _sigtramp + 3460215712
5  clang-3.5                0x0000000107eb358b raise + 27
6  clang-3.5                0x0000000107eb3642 abort + 18
7  clang-3.5                0x0000000107eb3621 __assert_rtn + 129
8  clang-3.5                0x000000010a45e7f1
clang::FunctionProtoType::isNothrow(clang::ASTContext const&, bool) const + 129
9  clang-3.5                0x00000001086c71d0
clang::CodeGen::CodeGenModule::ConstructAttributeList(clang::CodeGen::CGFunctionInfo
const&, clang::Decl const*, llvm::SmallVector<llvm::AttributeSet, 8u>&,
unsigned int&, bool) + 480
10 clang-3.5                0x0000000108866fc8
clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(clang::Decl const*,
clang::CodeGen::CGFunctionInfo const&, llvm::Function*) + 104
11 clang-3.5                0x0000000108867adc
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool) + 204
12 clang-3.5                0x000000010886a93a
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, llvm::AttributeSet) + 858
13 clang-3.5                0x00000001086bf5b2
clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType, clang::CodeGen::CGFunctionInfo const*, bool) + 386
14 clang-3.5                0x00000001086e1152
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, bool, llvm::Value*, clang::ConstExprIterator,
clang::ConstExprIterator) + 1234
15 clang-3.5                0x00000001087582af
clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(clang::CXXConstructExpr
const*, clang::CodeGen::AggValueSlot) + 1295
16 clang-3.5                0x000000010874e5c2 (anonymous
namespace)::AggExprEmitter::VisitCXXConstructExpr(clang::CXXConstructExpr
const*) + 98
17 clang-3.5                0x000000010874b809
clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::AggExprEmitter,
void>::Visit(clang::Stmt*) + 2009
18 clang-3.5                0x000000010874aca2
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot) + 354
19 clang-3.5                0x00000001086dd84f
EmitAggMemberInitializer(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::LValue, clang::Expr*, llvm::Value*, clang::QualType,
llvm::ArrayRef<clang::VarDecl*>, unsigned int) + 1215
20 clang-3.5                0x00000001086dd312
clang::CodeGen::CodeGenFunction::EmitInitializerForField(clang::FieldDecl*,
clang::CodeGen::LValue, clang::Expr*, llvm::ArrayRef<clang::VarDecl*>) + 1490
21 clang-3.5                0x000000010875e159
clang::CodeGen::CodeGenFunction::EmitLambdaExpr(clang::LambdaExpr const*,
clang::CodeGen::AggValueSlot) + 681
22 clang-3.5                0x0000000108750a22 (anonymous
namespace)::AggExprEmitter::VisitLambdaExpr(clang::LambdaExpr*) + 98
23 clang-3.5                0x000000010874bc89
clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::AggExprEmitter,
void>::Visit(clang::Stmt*) + 3161
24 clang-3.5                0x000000010874aca2
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot) + 354
25 clang-3.5                0x0000000108732985
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 437
26 clang-3.5                0x000000010873279d
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 109
27 clang-3.5                0x0000000108793a7f (anonymous
namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 4511
28 clang-3.5                0x000000010879414b (anonymous
namespace)::ScalarExprEmitter::VisitExplicitCastExpr(clang::ExplicitCastExpr*)
+ 123
29 clang-3.5                0x000000010878dca8
clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter,
llvm::Value*>::VisitCStyleCastExpr(clang::CStyleCastExpr*) + 40
30 clang-3.5                0x0000000108788fe8
clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 2904
31 clang-3.5                0x000000010877e2c8 (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*) + 40
32 clang-3.5                0x000000010877e232
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 226
33 clang-3.5                0x0000000108732877
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 167
34 clang-3.5                0x000000010873279d
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 109
35 clang-3.5                0x00000001088286ad
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 573
36 clang-3.5                0x0000000108833aeb
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 139
37 clang-3.5                0x0000000108856c67
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&,
clang::Stmt const*) + 167
38 clang-3.5                0x0000000108857448
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1720
39 clang-3.5                0x000000010886d2fe
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 1214
40 clang-3.5                0x0000000108868dc1
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 529
41 clang-3.5                0x000000010886c044
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1076
42 clang-3.5                0x000000010886eab4
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 292
43 clang-3.5                0x0000000108963e1d (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 157
44 clang-3.5                0x000000010884fcbf
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 207
45 clang-3.5                0x00000001092b54cd clang::ParseAST(clang::Sema&,
bool, bool) + 941
46 clang-3.5                0x00000001082d473a
clang::ASTFrontendAction::ExecuteAction() + 522
47 clang-3.5                0x000000010884ea2b
clang::CodeGenAction::ExecuteAction() + 3307
48 clang-3.5                0x00000001082d3cb8 clang::FrontendAction::Execute()
+ 120
49 clang-3.5                0x0000000108269734
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 996
50 clang-3.5                0x00000001083357c0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3200
51 clang-3.5                0x000000010662c580 cc1_main(char const**, char
const**, char const*, void*) + 2368
52 clang-3.5                0x000000010662052a main + 858
53 libdyld.dylib            0x00007fff8e0075fd start + 1
Stack dump:
0.  Program arguments: /Users/ldionne/code/llvm/build/bin/clang-3.5 -cc1
-triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free
-main-file-name worksheet.cpp -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-dwarf-column-info -resource-dir
/Users/ldionne/code/llvm/build/bin/../lib/clang/3.6.0 -stdlib=libc++ -std=c++1y
-fdeprecated-macro -fdebug-compilation-dir /Users/ldionne/code/llvm
-ferror-limit 19 -fmessage-length 101 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/6f/d7xhg3bx4zq467t3d6kb4fr80000gn/T/worksheet-325697.o -x c++
/Users/ldionne/desktop/bugreports/llvm_assert_fusion_list/worksheet.cpp
1.  <eof> parser at end of file
2. 
/Users/ldionne/desktop/bugreports/llvm_assert_fusion_list/worksheet.cpp:3:5:
LLVM IR generation of declaration 'main'
3. 
/Users/ldionne/desktop/bugreports/llvm_assert_fusion_list/worksheet.cpp:3:5:
Generating code for declaration 'main'
clang-3.5: error: unable to execute command: Illegal instruction: 4
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0
Target: x86_64-apple-darwin13.2.0
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.5: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/var/folders/6f/d7xhg3bx4zq467t3d6kb4fr80000gn/T/worksheet-5231b2.cpp
clang-3.5: note: diagnostic msg:
/var/folders/6f/d7xhg3bx4zq467t3d6kb4fr80000gn/T/worksheet-5231b2.sh
clang-3.5: note: diagnostic msg:

********************
------------------------------------------------------------------------------

Regards,
Louis Dionne

-- 
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/20140811/a401b168/attachment.html>


More information about the llvm-bugs mailing list