You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICE on valid code with -O1: Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
#50194
Closed
chengniansun opened this issue
Jun 24, 2021
· 1 comment
...and the bug has probably been around for a long time without anyone noticing, so I'm marking as fixed instead of requesting backporting to the 13.0 release branch.
Extended Description
$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git 24d48d4)
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
extern memcmp(const *, const *, buf1);
buf1() {
if (memcmp(buf1, "abcde", 6))
abort();
}
$ clang-trunk -O1 mutant.c
mutant.c:1:22: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern memcmp(const *, const *, buf1);
~~~~~ ^
mutant.c:1:31: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern memcmp(const *, const *, buf1);
~~~~~ ^
mutant.c:1:33: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern memcmp(const *, const *, buf1);
^
mutant.c:1:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern memcmp(const *, const *, buf1);
The text was updated successfully, but these errors were encountered: