Issue |
96018
|
Summary |
Clang-19 crashed: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
|
Labels |
new issue
|
Assignees |
|
Reporter |
iamanonymouscs
|
Clang-19 with the attribute `interrupt` enabled.
Compiler explorer(assertion trunck): https://godbolt.org/z/5xPr7ob1M
```
$cat mutant.c
__attribute__((interrupt)) void a(void()) {}
$clang-19 mutant.c
mutant.c:1:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
1 | __attribute__((interrupt)) void a(void()) {}
| ^
clang: /root/llvm-project/llvm/include/llvm/Support/Casting.h:566: decltype(auto) llvm::cast(const From&) [with To = clang::PointerType; From = clang::QualType]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/lib/llvm-19/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name mutant.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/root/code/my_code/diff_coverage/combine_test/case_reduce -fcoverage-compilation-dir=/root/code/my_code/diff_coverage/combine_test/case_reduce -resource-dir /usr/lib/llvm-19/lib/clang/19 -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/mutant-2667de.o -x c mutant.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'mutant.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@a'
#0 0x00007ff7bcbf7216 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xdc1216)
#1 0x00007ff7bcbf4ec0 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xdbeec0)
#2 0x00007ff7bcbf78f0 (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xdc18f0)
#3 0x00007ff7c75e6980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ff7bcc48923 (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xe12923)
#5 0x000055eba94d2cc0
clang-19: error: unable to execute command: Segmentation fault (core dumped)
clang-19: error: clang frontend command failed due to signal (use -v to see invocation)
Ubuntu clang version 19.0.0 (++20240301064251+dd426fa5f931-1~exp1~20240301184412.1845)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
clang-19: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-19: note: diagnostic msg: /tmp/mutant-db5637.c
clang-19: note: diagnostic msg: /tmp/mutant-db5637.sh
clang-19: note: diagnostic msg:
********************
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs