[llvm-bugs] [Bug 45041] New: ICE parsing std::__parse_int::_Power_help from GCC 7.4's bits/parse_numbers.h in C++20 mode

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 27 01:33:36 PST 2020


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

            Bug ID: 45041
           Summary: ICE parsing std::__parse_int::_Power_help from GCC
                    7.4's bits/parse_numbers.h in C++20 mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: raul+llvm at tambre.ee
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Created attachment 23178
  --> https://bugs.llvm.org/attachment.cgi?id=23178&action=edit
Repro case

Issue only occurs in C++20 mode.

Stack dump:
0.      Program arguments: /usr/lib/llvm-11/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name parse_numbers.cpp -mrelocation-model
static -mthread-model posix -mframe-pointer=all -fmath-errno
-fdenormal-fp-math=ieee,ieee -fdenormal-fp-math-f32=ieee,ieee
-fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining
-debugger-tuning=gdb --std=c++20 -fdeprecated-macro -ferror-limit 19
-fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -faddrsig -x c++
parse_numbers-771462.cpp
1.     
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/parse_numbers.h:167:4:
at annotation token
2.     
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/parse_numbers.h:41:1:
parsing namespace 'std'
3.     
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/parse_numbers.h:45:1:
parsing namespace 'std::__parse_int'
4.     
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/parse_numbers.h:162:5:
parsing struct/union/class body 'std::__parse_int::_Power_help'
 #0 0x00007f89497d7b3f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x99bb3f)
 #1 0x00007f89497d5e00 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x999e00)
 #2 0x00007f89497d8105 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x99c105)
 #3 0x00007f8948c2f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f8946e79e6a clang::IdentifierResolver::begin(clang::DeclarationName)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xe1ee6a)
 #5 0x00007f8947263313 clang::Sema::CppLookupName(clang::LookupResult&,
clang::Scope*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1208313)
 #6 0x00007f89472671c4 clang::Sema::LookupName(clang::LookupResult&,
clang::Scope*, bool) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x120c1c4)
 #7 0x00007f8946fb11c1 clang::Sema::isTagName(clang::IdentifierInfo&,
clang::Scope*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xf561c1)
 #8 0x00007f8946905350 clang::Parser::ParseImplicitInt(clang::DeclSpec&,
clang::CXXScopeSpec*, clang::Parser::ParsedTemplateInfo const&,
clang::AccessSpecifier, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8aa350)
 #9 0x00007f89468ff78f
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8a478f)
#10 0x00007f89468f411b
clang::Parser::ParseSpecifierQualifierList(clang::DeclSpec&,
clang::AccessSpecifier, clang::Parser::DeclSpecContext)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x89911b)
#11 0x00007f89468f3e7f clang::Parser::ParseTypeName(clang::SourceRange*,
clang::DeclaratorContext, clang::AccessSpecifier, clang::Decl**,
clang::ParsedAttributes*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x898e7f)
#12 0x00007f8946918b1b
clang::Parser::ParseAliasDeclarationAfterDeclarator(clang::Parser::ParsedTemplateInfo
const&, clang::SourceLocation, clang::Parser::UsingDeclarator&,
clang::SourceLocation&, clang::AccessSpecifier, clang::ParsedAttributes&,
clang::Decl**) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8bdb1b)
#13 0x00007f89469178f0
clang::Parser::ParseUsingDeclaration(clang::DeclaratorContext,
clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation,
clang::SourceLocation&, clang::AccessSpecifier)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8bc8f0)
#14 0x00007f8946921aee
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8c6aee)
#15 0x00007f8946923c66
clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&,
clang::Parser::ParsedAttributesWithRange&, clang::TypeSpecifierType,
clang::Decl*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8c8c66)
#16 0x00007f894691e3d7
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8c33d7)
#17 0x00007f894691d056
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8c2056)
#18 0x00007f89468fdfe5
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8a2fe5)
#19 0x00007f89469877d0
clang::Parser::ParseSingleDeclarationAfterTemplate(clang::DeclaratorContext,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x92c7d0)
#20 0x00007f8946986cfe
clang::Parser::ParseTemplateDeclarationOrSpecialization(clang::DeclaratorContext,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x92bcfe)
#21 0x00007f8946986724
clang::Parser::ParseDeclarationStartingWithTemplate(clang::DeclaratorContext,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x92b724)
#22 0x00007f89468fd690
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8a2690)
#23 0x00007f894699701c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x93c01c)
#24 0x00007f8946915bea
clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo,
4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8babea)
#25 0x00007f89469157d3 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8ba7d3)
#26 0x00007f89468fd790
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8a2790)
#27 0x00007f894699701c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x93c01c)
#28 0x00007f8946915bea
clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo,
4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8babea)
#29 0x00007f89469157d3 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8ba7d3)
#30 0x00007f89468fd790
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8a2790)
#31 0x00007f894699701c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x93c01c)
#32 0x00007f8946995c4c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x93ac4c)
#33 0x00007f89468ee4ad clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x8934ad)
#34 0x00007f8947deac78 clang::FrontendAction::Execute()
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1d8fc78)
#35 0x00007f8947da3751
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1d48751)
#36 0x00007f8947e4e8cf
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1df38cf)
#37 0x0000000000412340 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-11/bin/clang+0x412340)
#38 0x0000000000410611 (/usr/lib/llvm-11/bin/clang+0x410611)
#39 0x000000000040e701 main (/usr/lib/llvm-11/bin/clang+0x40e701)
#40 0x00007f894534cb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#41 0x000000000040d91a _start (/usr/lib/llvm-11/bin/clang+0x40d91a)

-- 
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/20200227/c5e159e9/attachment-0001.html>


More information about the llvm-bugs mailing list