Closed
Description
Clang can be made to say:
clang: /home/dcb38/llvm/trunk/llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::UndefValue; From = llvm::Constant]: Assertion `Val && "isa<> used on a null pointer"' failed.
codegen_timing_486-53904b.sh.gz
codegen_timing_486-53904b.c.gz
Activity
llvmbot commentedon May 22, 2024
@llvm/issue-subscribers-c
Author: None (dcb314)
clang: /home/dcb38/llvm/trunk/llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::UndefValue; From = llvm::Constant]: Assertion `Val && "isa<> used on a null pointer"' failed.
codegen_timing_486-53904b.sh.gz
codegen_timing_486-53904b.c.gz
Endilll commentedon May 22, 2024
Can't reproduce on trunk and 18.1.0 with assertions: https://godbolt.org/z/8Wxvqcz4o
Can you provide full compiler output, not just the assertion? We need stack trace to identify where and at which stage the crash occurred.
dcb314 commentedon May 22, 2024
The version of the compiler I used was from this morning.
Git hash 1cf75cc.
Stack backtrace is
Machine type is x86_64. AMD Zen 3 I think.
When the reduction is finished, I will post it here.
Endilll commentedon May 22, 2024
Thank you for reducing it yourself! Please make sure you follow this guidance, in order for your reduction to be as useful as possible: #89807 (comment)
dcb314 commentedon May 22, 2024
It works fine with yesterday's clang:
But not todays ;-|
Yesterday's compiler has git hash 6246b49
and today's has 1cf75cc.
That looks like 142 commits, so that should be easy (for someone who knows
what they are doing), to bisect.
dtcxzyw commentedon May 22, 2024
Reproducer: https://godbolt.org/z/c1oT7cncd
LLVM version: cf12830
dcb314 commentedon May 22, 2024
Final reduced C code seems to be:
foldCmpLoadFromIndexedGlobal
#93050dtcxzyw commentedon May 22, 2024
Fixed by 0748a98