[llvm-bugs] [Bug 51199] New: ICE: {anonymous}::IntRange {anonymous}::IntRange::forTargetOfCanonicalType(clang::ASTContext&, const clang::Type*): Assertion `BT->isInteger()' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 23 17:53:17 PDT 2021


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

            Bug ID: 51199
           Summary: ICE: {anonymous}::IntRange
                    {anonymous}::IntRange::forTargetOfCanonicalType(clang:
                    :ASTContext&, const clang::Type*): Assertion
                    `BT->isInteger()' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cnsun at uwaterloo.ca
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
ab5ac659c81a453a3f58df94f39fe8ba3cd35918)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ cat mutant.c
enum { false } __attribute__((mode(SF))) test() { return foo(); }

$ clang-trunk -w mutant.c
mutant.c:1:31: error: type of machine mode does not match type of base type
enum { false } __attribute__((mode(SF))) test() { return foo(); }
                              ^
clang-13:
/tmp/tmp.Gcp8nSn9Hr-clang-builder/llvm-project/clang/lib/Sema/SemaChecking.cpp:11008:
static {anonymous}::IntRange
{anonymous}::IntRange::forTargetOfCanonicalType(clang::ASTContext&, const
clang::Type*): Assertion `BT->isInteger()' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /scratch/software/clang-trunk/bin/clang-13 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-name mutant.c -mrelocation-model static
-mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/temp_testing_campaigns/default_finding_folder_c/crash_20210710_034729_386f/delta/perses_result
-resource-dir /scratch/software/clang-trunk/lib/clang/13.0.0 -c-isystem .
-c-isystem /usr/local/include/cmsith -internal-isystem
/scratch/software/clang-trunk/lib/clang/13.0.0/include -internal-isystem
/usr/local/include -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -w
-fdebug-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/temp_testing_campaigns/default_finding_folder_c/crash_20210710_034729_386f/delta/perses_result
-ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1
-o /tmp/mutant-0da0b9.o -x c mutant.c
1.      mutant.c:1:63: current parser token ';'
2.      mutant.c:1:49: parsing function body 'test'
3.      mutant.c:1:49: in compound statement ('{}')
 #0 0x00005575b22ec754 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00005575b22e9e6e SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f0aa4e473c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #3 0x00007f0aa48e618b raise
/build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #4 0x00007f0aa48c5859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
 #5 0x00007f0aa48c5729 get_sysdep_segment_value
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
 #6 0x00007f0aa48c5729 _nl_load_domain
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
 #7 0x00007f0aa48d6f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
 #8 0x00005575b46cf744 (anonymous
namespace)::IntRange::forTargetOfCanonicalType(clang::ASTContext&, clang::Type
const*) SemaChecking.cpp:0:0
 #9 0x00005575b4707041 CheckImplicitConversion(clang::Sema&, clang::Expr*,
clang::QualType, clang::SourceLocation, bool*, bool) SemaChecking.cpp:0:0
#10 0x00005575b470ae0f AnalyzeImplicitConversions(clang::Sema&, clang::Expr*,
clang::SourceLocation, bool) (.constprop.0) SemaChecking.cpp:0:0
#11 0x00005575b471ee5f clang::Sema::CheckCompletedExpr(clang::Expr*,
clang::SourceLocation, bool)
(/scratch/software/clang-trunk/bin/clang-13+0x5f57e5f)
#12 0x00005575b4ac2c52 clang::Sema::ActOnFinishFullExpr(clang::Expr*,
clang::SourceLocation, bool, bool)
(/scratch/software/clang-trunk/bin/clang-13+0x62fbc52)
#13 0x00005575b4d4c053 clang::Sema::BuildReturnStmt(clang::SourceLocation,
clang::Expr*) (/scratch/software/clang-trunk/bin/clang-13+0x6585053)
#14 0x00005575b4d4cffa clang::Sema::ActOnReturnStmt(clang::SourceLocation,
clang::Expr*, clang::Scope*)
(/scratch/software/clang-trunk/bin/clang-13+0x6585ffa)
#15 0x00005575b4602a8f clang::Parser::ParseReturnStatement()
(/scratch/software/clang-trunk/bin/clang-13+0x5e3ba8f)
#16 0x00005575b4605bce
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::ParsedAttributesWithRange&)
(/scratch/software/clang-trunk/bin/clang-13+0x5e3ebce)
#17 0x00005575b46069aa
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/scratch/software/clang-trunk/bin/clang-13+0x5e3f9aa)
#18 0x00005575b4607929 clang::Parser::ParseCompoundStatementBody(bool)
(/scratch/software/clang-trunk/bin/clang-13+0x5e40929)
#19 0x00005575b4609eda clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/scratch/software/clang-trunk/bin/clang-13+0x5e42eda)
#20 0x00005575b454f992
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/scratch/software/clang-trunk/bin/clang-13+0x5d88992)
#21 0x00005575b457c3a0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/scratch/software/clang-trunk/bin/clang-13+0x5db53a0)
#22 0x00005575b454a176
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/scratch/software/clang-trunk/bin/clang-13+0x5d83176)
#23 0x00005575b454a761
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.0) Parser.cpp:0:0
#24 0x00005575b4550f87
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/scratch/software/clang-trunk/bin/clang-13+0x5d89f87)
#25 0x00005575b455251e
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/scratch/software/clang-trunk/bin/clang-13+0x5d8b51e)
#26 0x00005575b45528c9
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/scratch/software/clang-trunk/bin/clang-13+0x5d8b8c9)
#27 0x00005575b4544d1a clang::ParseAST(clang::Sema&, bool, bool)
(/scratch/software/clang-trunk/bin/clang-13+0x5d7dd1a)
#28 0x00005575b347f2f8 clang::CodeGenAction::ExecuteAction()
(/scratch/software/clang-trunk/bin/clang-13+0x4cb82f8)
#29 0x00005575b2d1d419 clang::FrontendAction::Execute()
(/scratch/software/clang-trunk/bin/clang-13+0x4556419)
#30 0x00005575b2cb307e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/scratch/software/clang-trunk/bin/clang-13+0x44ec07e)
#31 0x00005575b2dfb710
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/scratch/software/clang-trunk/bin/clang-13+0x4634710)
#32 0x00005575afb6715d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/scratch/software/clang-trunk/bin/clang-13+0x13a015d)
#33 0x00005575afb634a8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#34 0x00005575afa8e126 main
(/scratch/software/clang-trunk/bin/clang-13+0x12c7126)
#35 0x00007f0aa48c70b3 __libc_start_main
/build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
#36 0x00005575afb6301e _start
(/scratch/software/clang-trunk/bin/clang-13+0x139c01e)
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
ab5ac659c81a453a3f58df94f39fe8ba3cd35918)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/mutant-251bd7.c
clang-13: note: diagnostic msg: /tmp/mutant-251bd7.sh
clang-13: 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/20210724/18e73a72/attachment.html>


More information about the llvm-bugs mailing list