[llvm-bugs] [Bug 37027] New: Assertion `(!needsOverloadResolutionForDestructor() || (data().DeclaredSpecialMembers & SMF_Destructor)) && "this property has not yet been computed by Sema"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 5 20:23:55 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37027

            Bug ID: 37027
           Summary: Assertion `(!needsOverloadResolutionForDestructor() ||
                    (data().DeclaredSpecialMembers & SMF_Destructor)) &&
                    "this property has not yet been computed by Sema"'
                    failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: regehr at cs.utah.edu
                CC: llvm-bugs at lists.llvm.org

regehr at john-home:~/reduce/1/creduce_extra_02617$ clang++ -v
clang version 7.0.0 (trunk 329206)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/regehr/llvm-install/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.3.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

regehr at john-home:~/reduce/1/creduce_extra_02617$ cat hello.cpp
class a {          ~a(
} class b {
  a c;                           ~b(            const

regehr at john-home:~/reduce/1/creduce_extra_02617$ clang++ hello.cpp -c -w
hello.cpp:2:1: error: expected parameter declarator
} class b {
^
hello.cpp:2:1: error: expected ')'
hello.cpp:1:22: note: to match this '('
class a {          ~a(
                     ^
hello.cpp:1:23: error: expected ';' at end of declaration list
class a {          ~a(
                      ^
                      ;
hello.cpp:2:2: error: expected ';' after class
} class b {
 ^
 ;
hello.cpp:3:54: error: C++ requires a type specifier for all declarations
  a c;                           ~b(            const
                                                ~~~~~^
hello.cpp:3:54: error: expected ')'
hello.cpp:3:36: note: to match this '('
  a c;                           ~b(            const
                                   ^
hello.cpp:3:34: error: destructor cannot have any parameters
  a c;                           ~b(            const
                                 ^
hello.cpp:3:54: error: expected ';' at end of declaration list
  a c;                           ~b(            const
                                                     ^
                                                     ;
hello.cpp:3:54: error: expected '}'
hello.cpp:2:11: note: to match this '{'
} class b {
          ^
clang-7: ../tools/clang/include/clang/AST/DeclCXX.h:888: bool
clang::CXXRecordDecl::defaultedDestructorIsDeleted() const: Assertion
`(!needsOverloadResolutionForDestructor() || (data().DeclaredSpecialMembers &
SMF_Destructor)) && "this property has not yet been computed by Sema"' failed.
#0 0x0000000001433ed4 PrintStackTraceSignalHandler(void*)
(/home/regehr/llvm-install/bin/clang-7+0x1433ed4)
#1 0x0000000001434236 SignalHandler(int)
(/home/regehr/llvm-install/bin/clang-7+0x1434236)
#2 0x00007fe763cbf390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#3 0x00007fe762822428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#4 0x00007fe76282402a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#5 0x00007fe76281abd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#6 0x00007fe76281ac82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#7 0x0000000002aa2548
clang::Sema::CheckCompletedCXXClass(clang::CXXRecordDecl*)
(/home/regehr/llvm-install/bin/clang-7+0x2aa2548)
#8 0x0000000002aa8f57
clang::Sema::ActOnFinishCXXMemberSpecification(clang::Scope*,
clang::SourceLocation, clang::Decl*, clang::SourceLocation,
clang::SourceLocation, clang::AttributeList*)
(/home/regehr/llvm-install/bin/clang-7+0x2aa8f57)
#9 0x0000000002679a34
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) (/home/regehr/llvm-install/bin/clang-7+0x2679a34)
#10 0x000000000267804f
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/home/regehr/llvm-install/bin/clang-7+0x267804f)
#11 0x000000000265c040
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/home/regehr/llvm-install/bin/clang-7+0x265c040)
#12 0x0000000002647b6e
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/regehr/llvm-install/bin/clang-7+0x2647b6e)
#13 0x0000000002647881
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/regehr/llvm-install/bin/clang-7+0x2647881)
#14 0x0000000002646203
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/home/regehr/llvm-install/bin/clang-7+0x2646203)
#15 0x00000000026456a8
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/regehr/llvm-install/bin/clang-7+0x26456a8)
#16 0x0000000002641647 clang::ParseAST(clang::Sema&, bool, bool)
(/home/regehr/llvm-install/bin/clang-7+0x2641647)
#17 0x0000000001a5e480 clang::FrontendAction::Execute()
(/home/regehr/llvm-install/bin/clang-7+0x1a5e480)
#18 0x0000000001a0b131
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/regehr/llvm-install/bin/clang-7+0x1a0b131)
#19 0x0000000001af7db6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/regehr/llvm-install/bin/clang-7+0x1af7db6)
#20 0x00000000007b5f53 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/regehr/llvm-install/bin/clang-7+0x7b5f53)
#21 0x00000000007b40c0 main (/home/regehr/llvm-install/bin/clang-7+0x7b40c0)
#22 0x00007fe76280d830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#23 0x00000000007b1329 _start (/home/regehr/llvm-install/bin/clang-7+0x7b1329)
Stack dump:
0.      Program arguments: /home/regehr/llvm-install/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
hello.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 -dwarf-column-info -debugger-tuning=gdb
-coverage-notes-file /home/regehr/reduce/1/creduce_extra_02617/hello.gcno
-resource-dir /home/regehr/llvm-install/lib/clang/7.0.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/regehr/llvm-install/lib/clang/7.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -w -fdeprecated-macro
-fdebug-compilation-dir /home/regehr/reduce/1/creduce_extra_02617 -ferror-limit
19 -fmessage-length 99 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o hello.o -x c++ hello.cpp 
1.      <eof> parser at end of file
2.      hello.cpp:2:3: parsing struct/union/class body 'b'
clang-7: error: unable to execute command: Aborted
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (trunk 329206)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/regehr/llvm-install/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-7: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/hello-9a7c88.cpp
clang-7: note: diagnostic msg: /tmp/hello-9a7c88.sh
clang-7: note: diagnostic msg: 

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

-- 
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/20180406/c6058282/attachment.html>


More information about the llvm-bugs mailing list