[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 09:48:32 PST 2025
AlexVlx wrote:
> @AlexVlx I found this breaks my clang build, reduced the C++ source to the following reproducer https://godbolt.org/z/jGnvKeqvr. Please verify that it breaks for you as well and revert or fix. (The issue is the s() function call not using AS(5))
>
> ```c++
> #pragma omp begin declare target
> struct S {
> ~S() { };
> };
> S s();
> struct E {
> S foo;
> E();
> };
> E::E() : foo(s()) {}
> #pragma omp end declare target
> ```
>
> ```
> > ./bin/clang++ omp-bug.cpp -fopenmp --offload-arch=gfx1030 -nogpulib
> clang-21: /home/jhuber/Documents/llvm/llvm-project/clang/lib/CodeGen/CGCall.cpp:5648: clang::CodeGen::RValue clang::CodeGen::CodeGenFunction::EmitCall(const clang::CodeGen::CGFunctionInfo&, const clang::CodeGen::CGCallee&, clang::CodeGen::ReturnValueSlot, const clang::CodeGen::CallArgList&, llvm::CallBase**, bool, clang::SourceLocation, bool): Assertion `IRCallArgs[i]->getType() == IRFuncTy->getParamType(i)' failed.
> ```
Thank you for flagging this. Please see #127528.
https://github.com/llvm/llvm-project/pull/114062
More information about the cfe-commits
mailing list