Open Quuxplusone opened 3 years ago
Attached cpu_model-3ac5e8.c
(97717 bytes, text/x-csrc): Preprocessed source.
Attached cpu_model-3ac5e8.sh
(4847 bytes, application/x-shellscript): Run script for preprocessed source.
@John, Can you please attach bitcode/IR? I am not able to compile the test with the provided configuration.
Reduced test:
$ cat bug.c
static int a() { return 1; }
void b() { a(); }
$ bin/clang --target=x86_64-linux-gnu -c -O3 bug.c
clang: /home/harald/llvm-project/llvm/include/llvm/Support/Casting.h:269:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
llvm::CallBase; Y = llvm::User; typename llvm::cast_retty<X, Y*>::ret_type =
llvm::CallBase*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
[...]
$ bin/clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project/
167ea67d76c297eb5dd3fa5f4ffc3c85e1842faa)
Target: x86_64-pc-linux-gnux32
Thread model: posix
InstalledDir: /home/harald/llvm-project/stage1/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnux32/10
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnux32/10
Candidate multilib: .;@mx32
Candidate multilib: 64;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@mx32
I cannot provide an IR test case as with -save-temps the error disappears.
D98884 was reverted at rGfb6a5237aa73e42d476f3736afcd531a593d3c33 - would it be possible to get a regression test committed before D98884 is committed again?
(In reply to Simon Pilgrim from comment #5)
> D98884 was reverted at rGfb6a5237aa73e42d476f3736afcd531a593d3c33 - would it
> be possible to get a regression test committed before D98884 is committed
> again?
You mean, test with the latest revision of the patch (haven't checked the
current status of D98884 yet, but I also didn't get any update notification)?
(In reply to John Paul Adrian Glaubitz from comment #6)
> (In reply to Simon Pilgrim from comment #5)
> > D98884 was reverted at rGfb6a5237aa73e42d476f3736afcd531a593d3c33 - would it
> > be possible to get a regression test committed before D98884 is committed
> > again?
>
> You mean, test with the latest revision of the patch (haven't checked the
> current status of D98884 yet, but I also didn't get any update notification)?
Not necessarily, I was thinking you could add a suitably reduced test case that
failed with the previous implementation to help Madhur so that any future
version of D98884 is known to correctly handle it before its committed.
Once I root caused the issue I will do bootstrap builds and that should confirm if it is fixed or not.
(In reply to Simon Pilgrim from comment #7)
> > You mean, test with the latest revision of the patch (haven't checked the
> > current status of D98884 yet, but I also didn't get any update
notification)?
>
> Not necessarily, I was thinking you could add a suitably reduced test case
> that failed with the previous implementation to help Madhur so that any
> future version of D98884 is known to correctly handle it before its
> committed.
If I remember correctly, the change broke the build for multiple architectures,
not just x86_64-32. I think ppc64el was affected as well.
cpu_model-3ac5e8.c
(97717 bytes, text/x-csrc)cpu_model-3ac5e8.sh
(4847 bytes, application/x-shellscript)