LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 22620 - Assertion failed: (EST == EST_Dynamic && "EST case not considered earlier."), function CalledDecl, file tools/clang/lib/Sema/SemaDeclCXX.cpp, line 210.
Summary: Assertion failed: (EST == EST_Dynamic && "EST case not considered earlier."),...
Status: RESOLVED DUPLICATE of bug 24000
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 15:56 PST by Dimitry Andric
Modified: 2015-07-01 12:52 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
Test case for EST == EST_Dynamic assertion (244 bytes, application/octet-stream)
2015-02-17 15:56 PST, Dimitry Andric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2015-02-17 15:56:24 PST
Created attachment 13887 [details]
Test case for EST == EST_Dynamic assertion

This is a new assertion failure, first encountered here, while compiling codeblocks:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-11_23h04m51s/logs/errors/codeblocks-13.12_4.log

The assertion reproduces with trunk r229540.  Apparently it is caused by something declared with a strange or incomplete exception specification: when I print out 'EST' at the point of the assertion, the value is 'EST_Unparsed'.  

The test case must be compiled with -std=c++11 for the assertion to fire.
Comment 1 Dimitry Andric 2015-02-28 11:07:12 PST
Backtrace, with a trunk r230746 debug build:

#0  0x0000000807e1ea3a in thr_kill () from /lib/libc.so.7
#1  0x0000000807e1e9a8 in raise () from /lib/libc.so.7
#2  0x0000000807e1d109 in abort () from /lib/libc.so.7
#3  0x0000000807dfddc1 in __assert () from /lib/libc.so.7
#4  0x000000000479bd64 in clang::Sema::ImplicitExceptionSpecification::CalledDecl (this=0x7fffffff5050, CallLoc=..., Method=0x808d6a120)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:210
#5  0x00000000047c7847 in clang::Sema::ComputeDefaultedDtorExceptionSpec (
    this=0x808cfa000, MD=0x808d6ad40)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:9302
#6  0x00000000047b44e7 in computeImplicitExceptionSpec (S=..., Loc=...,
    MD=0x808d6ad40)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:5137
#7  0x00000000047b4362 in clang::Sema::EvaluateImplicitExceptionSpec (
    this=0x808cfa000, Loc=..., MD=0x808d6ad40)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:5167
#8  0x000000000488da21 in clang::Sema::ResolveExceptionSpec (this=0x808cfa000,
    Loc=..., FPT=0x808d6adf0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaExceptionSpec.cpp:160
#9  0x000000000488f9e6 in clang::Sema::CheckExceptionSpecSubset (
    this=0x808cfa000, DiagID=..., NoteID=..., Superset=0x808d6b6e0,
    SuperLoc=..., Subset=0x808d6adf0, SubLoc=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaExceptionSpec.cpp:577
#10 0x0000000004890e21 in clang::Sema::CheckOverridingFunctionExceptionSpec (
    this=0x808cfa000, New=0x808d6ad40, Old=0x808cd1f00)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaExceptionSpec.cpp:832
#11 0x00000000047b5dd2 in clang::Sema::CheckDelayedMemberExceptionSpecs (
    this=0x808cfa000)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:5388
#12 0x00000000047c70d9 in clang::Sema::ActOnFinishDelayedMemberInitializers (
    this=0x808cfa000, D=0x808d6b4d0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:8938
#13 0x0000000004c93978 in clang::Sema::InstantiateClass (this=0x808cfa000,
    PointOfInstantiation=..., Instantiation=0x808d6b4d0, Pattern=0x808d69290,
    TemplateArgs=..., TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2095
#14 0x0000000004c95ce1 in clang::Sema::InstantiateClassTemplateSpecialization (
    this=0x808cfa000, PointOfInstantiation=..., ClassTemplateSpec=0x808d6b4d0,
    TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2457
#15 0x0000000004d3f16e in clang::Sema::RequireCompleteTypeImpl (
    this=0x808cfa000, Loc=..., T=..., Diagnoser=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaType.cpp:5261
#16 0x0000000004d3ea76 in clang::Sema::RequireCompleteType (this=0x808cfa000,
    Loc=..., T=..., Diagnoser=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaType.cpp:5088
#17 0x0000000004d355c2 in clang::Sema::RequireCompleteType (this=0x808cfa000,
    Loc=..., T=..., DiagID=2150)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaType.cpp:5315
#18 0x00000000047563d6 in clang::Sema::CheckFieldDecl (this=0x808cfa000,
    Name=..., T=..., TInfo=0x808d6b648, Record=0x808d695a0, Loc=...,
    Mutable=false, BitWidth=0x0, InitStyle=clang::ICIS_NoInit, TSSL=...,
    AS=clang::AS_private, PrevDecl=0x0, D=0x7fffffff7d58)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDecl.cpp:12336
#19 0x0000000004756131 in clang::Sema::HandleField (this=0x808cfa000,
    S=0x808d36540, Record=0x808d695a0, DeclStart=..., D=..., BitWidth=0x0,
    InitStyle=clang::ICIS_NoInit, AS=clang::AS_private)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDecl.cpp:12285
#20 0x00000000047a6c2d in clang::Sema::ActOnCXXMemberDeclarator (
    this=0x808cfa000, S=0x808d36540, AS=clang::AS_private, D=...,
    TemplateParameterLists=..., BW=0x0, VS=..., InitStyle=clang::ICIS_NoInit)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Sema/SemaDeclCXX.cpp:2200
#21 0x00000000043eabef in clang::Parser::ParseCXXClassMemberDeclaration (
    this=0x808d26400, AS=clang::AS_private, AccessAttrs=0x0, TemplateInfo=...,
    TemplateDiags=0x0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/ParseDeclCXX.cpp:2438
#22 0x00000000043e7cf3 in clang::Parser::ParseCXXMemberSpecification (
    this=0x808d26400, RecordLoc=..., AttrFixitLoc=..., Attrs=..., TagType=18,
    TagDecl=0x808d695a0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/ParseDeclCXX.cpp:2877
#23 0x00000000043e64e4 in clang::Parser::ParseClassSpecifier (
    this=0x808d26400, TagTokKind=clang::tok::TokenKind::kw_class,
    StartLoc=..., DS=..., TemplateInfo=..., AS=clang::AS_none,
    EnteringContext=true, DSC=clang::Parser::DSC_top_level, Attributes=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/ParseDeclCXX.cpp:1712
#24 0x00000000043c56c5 in clang::Parser::ParseDeclarationSpecifiers (
    this=0x808d26400, DS=..., TemplateInfo=..., AS=clang::AS_none,
    DSContext=clang::Parser::DSC_top_level, LateAttrs=0x0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/ParseDecl.cpp:3231
#25 0x00000000043af3b1 in clang::Parser::ParseDeclOrFunctionDefInternal (
    this=0x808d26400, attrs=..., DS=..., AS=clang::AS_none)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/Parser.cpp:836
#26 0x00000000043aeeb3 in clang::Parser::ParseDeclarationOrFunctionDefinition (
    this=0x808d26400, attrs=..., DS=0x0, AS=clang::AS_none)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/Parser.cpp:909
#27 0x00000000043ae54a in clang::Parser::ParseExternalDeclaration (
    this=0x808d26400, attrs=..., DS=0x0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/Parser.cpp:767
#28 0x00000000043ad5bd in clang::Parser::ParseTopLevelDecl (this=0x808d26400,
    Result=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/Parser.cpp:569
#29 0x00000000043a68d3 in clang::ParseAST (S=..., PrintStats=false,
    SkipFunctionBodies=false)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Parse/ParseAST.cpp:144
#30 0x000000000309c92a in clang::ASTFrontendAction::ExecuteAction (
    this=0x808c540f0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:537
#31 0x00000000035561e0 in clang::CodeGenAction::ExecuteAction (
    this=0x808c540f0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/CodeGen/CodeGenAction.cpp:733
#32 0x000000000309baf0 in clang::FrontendAction::Execute (this=0x808c540f0)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:439
#33 0x000000000303ec30 in clang::CompilerInstance::ExecuteAction (
    this=0x808c2d140, Act=...)
    at /share/dim/src/llvm/trunk/tools/clang/lib/Frontend/CompilerInstance.cpp:806
#34 0x000000000321b6fb in clang::ExecuteCompilerInvocation (Clang=0x808c2d140)
    at /share/dim/src/llvm/trunk/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222
#35 0x000000000179a2be in cc1_main (Argv=...,
    Argv0=0x7fffffffe538 "/home/dim/obj/llvm-230746-trunk-freebsd11-amd64-ninja-dbg-1/bin/clang-3.7",
    MainAddr=0x178c6f0 <GetExecutablePath(char const*, bool)>)
    at /share/dim/src/llvm/trunk/tools/clang/tools/driver/cc1_main.cpp:110
#36 0x000000000178e4c9 in ExecuteCC1Tool (argv=..., Tool=...)
    at /share/dim/src/llvm/trunk/tools/clang/tools/driver/driver.cpp:369
#37 0x000000000178cc68 in main (argc_=46, argv_=0x7fffffffe140)
    at /share/dim/src/llvm/trunk/tools/clang/tools/driver/driver.cpp:415
Comment 2 Dimitry Andric 2015-07-01 12:52:41 PDT
Let's continue this in bug 24000.  The testcase here can also be used to demonstrate the problem.

*** This bug has been marked as a duplicate of bug 24000 ***