[llvm-bugs] [Bug 37356] New: llvm/tools/clang/lib/AST/ASTContext.cpp:1920: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const: Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 7 10:06:55 PDT 2018


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

            Bug ID: 37356
           Summary: llvm/tools/clang/lib/AST/ASTContext.cpp:1920:
                    clang::TypeInfo
                    clang::ASTContext::getTypeInfoImpl(const clang::Type*)
                    const: Assertion `!A->getDeducedType().isNull() &&
                    "cannot request the size of an undeduced or dependent
                    auto type"' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vegard.nossum at gmail.com
                CC: llvm-bugs at lists.llvm.org

Input:

struct s {
  static auto x = ;
  void f() { asm("" : "+rm"(x)) }
}

Output:

$ clang++ -x c++ -c - < output/8.cc
<stdin>:2:19: error: expected expression
  static auto x = ;
                  ^
clang-7: /home/vegard/llvm/tools/clang/lib/AST/ASTContext.cpp:1920:
clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const:
Assertion `!A->getDeducedType().isNull() && "cannot request the size of an
undeduced or dependent auto type"' failed.
Stack dump:
0.      Program arguments: /home/vegard/llvm-build/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name -
-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/vegard/creduce/-.gcno -resource-dir
/home/vegard/llvm-build/lib/clang/7.0.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++ -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/backward
-internal-isystem /usr/local/include -internal-isystem
/home/vegard/llvm-build/lib/clang/7.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir /home/vegard/creduce -ferror-limit 19 -fmessage-length
180 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o -.o -x c++ - 
1.      <stdin>:3:33: current parser token '}'
2.      <stdin>:1:1: parsing struct/union/class body 's'
3.      <stdin>:3:12: parsing function body 's::f'
4.      <stdin>:3:12: in compound statement ('{}')
#0 0x0000000008da8742 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/vegard/llvm/lib/Support/Unix/Signals.inc:403:0
#1 0x0000000008d9e6f2 llvm::sys::RunSignalHandlers()
/home/vegard/llvm/lib/Support/Signals.cpp:50:0
#2 0x0000000008d9eea9 SignalHandler(int)
/home/vegard/llvm/lib/Support/Unix/Signals.inc:243:0
#3 0x00007f385ca33390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f385b79e428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f385b7a002a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f385b796bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f385b796c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00000000113a8783
/home/vegard/llvm/tools/clang/lib/AST/ASTContext.cpp:1919:0
#9 0x00000000113a3dee bool llvm::DenseMapBase<llvm::DenseMap<clang::Type
const*, clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo> >, clang::Type
const*, clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo>
>::LookupBucketFor<clang::Type const*>(clang::Type const* const&,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo>*&)
/home/vegard/llvm/include/llvm/ADT/DenseMap.h:627:0
#10 0x00000000113a3dee llvm::DenseMapBase<llvm::DenseMap<clang::Type const*,
clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo> >, clang::Type
const*, clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo>
>::FindAndConstruct(clang::Type const* const&)
/home/vegard/llvm/include/llvm/ADT/DenseMap.h:289:0
#11 0x00000000113a3dee llvm::DenseMapBase<llvm::DenseMap<clang::Type const*,
clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo> >, clang::Type
const*, clang::TypeInfo, llvm::DenseMapInfo<clang::Type const*>,
llvm::detail::DenseMapPair<clang::Type const*, clang::TypeInfo>
>::operator[](clang::Type const* const&)
/home/vegard/llvm/include/llvm/ADT/DenseMap.h:296:0
#12 0x00000000113a3dee clang::ASTContext::getTypeInfo(clang::Type const*) const
/home/vegard/llvm/tools/clang/lib/AST/ASTContext.cpp:1656:0
#13 0x000000001083875c clang::ASTContext::getTypeInfo(clang::QualType) const
/home/vegard/llvm/tools/clang/include/clang/AST/ASTContext.h:2017:0
#14 0x000000001083875c clang::ASTContext::getTypeSize(clang::QualType) const
/home/vegard/llvm/tools/clang/include/clang/AST/ASTContext.h:2023:0
#15 0x000000001083875c clang::Sema::ActOnGCCAsmStmt(clang::SourceLocation,
bool, bool, unsigned int, unsigned int, clang::IdentifierInfo**,
llvm::MutableArrayRef<clang::Expr*>, llvm::MutableArrayRef<clang::Expr*>,
clang::Expr*, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation)
/home/vegard/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp:289:0
#16 0x000000000ebeb933 clang::Parser::ParseAsmStatement(bool&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp:815:0
#17 0x000000000ebb8f26
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseStmt.cpp:278:0
#18 0x000000000ebb9f7e
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*)
/home/vegard/llvm/tools/clang/lib/Parse/ParseStmt.cpp:111:0
#19 0x000000000ebc587f clang::Parser::ParseCompoundStatementBody(bool)
/home/vegard/llvm/tools/clang/lib/Parse/ParseStmt.cpp:1003:0
#20 0x000000000ebccb40 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseStmt.cpp:1975:0
#21 0x000000000e9eea4f clang::Token::isNot(clang::tok::TokenKind) const
/home/vegard/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:551:0
#22 0x000000000e9eea4f
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:553:0
#23 0x000000000e9edf1e
llvm::SmallVectorTemplateCommon<clang::Parser::LateParsedDeclaration*,
void>::begin() const /home/vegard/llvm/include/llvm/ADT/SmallVector.h:118:0
#24 0x000000000e9edf1e
llvm::SmallVectorTemplateCommon<clang::Parser::LateParsedDeclaration*,
void>::size() const /home/vegard/llvm/include/llvm/ADT/SmallVector.h:136:0
#25 0x000000000e9edf1e
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:478:0
#26 0x000000000eaafd11
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) /home/vegard/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:3310:0
#27 0x000000000eab749d
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
/home/vegard/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:1915:0
#28 0x000000000ea3e3a4
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
/home/vegard/llvm/tools/clang/lib/Parse/ParseDecl.cpp:3675:0
#29 0x000000000e9cbe68
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:927:0
#30 0x000000000e9cdd91
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.168.constprop.192)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:1028:0
#31 0x000000000e9cded7
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:1030:0
#32 0x000000000e9dff74
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:853:0
#33 0x000000000e9e3529 _ZN5clang13AttributePoolD4Ev
/home/vegard/llvm/tools/clang/include/clang/Sema/AttributeList.h:642:0
#34 0x000000000e9e3529 _ZN5clang16ParsedAttributesD4Ev
/home/vegard/llvm/tools/clang/include/clang/Sema/AttributeList.h:755:0
#35 0x000000000e9e3529 _ZN5clang6Parser25ParsedAttributesWithRangeD4Ev
/home/vegard/llvm/tools/clang/include/clang/Parse/Parser.h:1308:0
#36 0x000000000e9e3529
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:606:0
#37 0x000000000e9e4e78
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/vegard/llvm/tools/clang/lib/Parse/Parser.cpp:536:0
#38 0x000000000e9baa78 clang::ParseAST(clang::Sema&, bool, bool)
/home/vegard/llvm/tools/clang/lib/Parse/ParseAST.cpp:151:0
#39 0x000000000c01df2c clang::CodeGenAction::ExecuteAction()
/home/vegard/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1044:0
#40 0x000000000aecb7d6 clang::FrontendAction::Execute()
/home/vegard/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:904:0
#41 0x000000000ad5d2c8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/vegard/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:990:0
#42 0x000000000b2dc498
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/vegard/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:256:0
#43 0x0000000000e993f8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/vegard/llvm/tools/clang/tools/driver/cc1_main.cpp:222:0
#44 0x0000000000de2539 ExecuteCC1Tool
/home/vegard/llvm/tools/clang/tools/driver/driver.cpp:310:0
#45 0x0000000000de2539 main
/home/vegard/llvm/tools/clang/tools/driver/driver.cpp:382:0
#46 0x00007f385b789830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#47 0x0000000000e7e1f9 _start (/home/vegard/llvm-build/bin/clang-7+0xe7e1f9)
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 (https://github.com/llvm-mirror/clang
fd84b47426fa82c78ca25ba20cf37fc9b0f42586) (https://github.com/llvm-mirror/llvm
e1b4442d3ffc378f4a48dd0bfeb2b0876b116e2f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vegard/llvm-build/bin

Looks similar to bug #31783, but that is supposed to be fixed while the bug
above happens on trunk. Same with bug #32583.

-- 
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/20180507/ea1188eb/attachment.html>


More information about the llvm-bugs mailing list