[llvm-bugs] [Bug 51982] New: MIssing addrspace cast in openmp-opt

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 27 07:33:52 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51982

            Bug ID: 51982
           Summary: MIssing addrspace cast in openmp-opt
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jonathanchesterfield at gmail.com
                CC: llvm-bugs at lists.llvm.org

Repros from nest_call_par2.c from aomp repo, cut down to the following:

// RUN: %libomptarget-compile-generic -O1 && %libomptarget-run-generic          

int main(void) {
  long int aa = 0;

  int ng = 12;
  int nxyz = 5;

  const long exp = ng * nxyz;

#pragma omp target map(tofrom : aa)
  for (int gid = 0; gid < nxyz; gid++) {
#pragma omp parallel for
    for (unsigned int g = 0; g < ng; g++) {
#pragma omp atomic
      aa += 1;
    }
  }
  if (aa != exp) {
    return 1;
  }
  return 0;
}

clang-14: /home/amd/llvm-project/llvm/lib/IR/Instructions.cpp:508: void
llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value
*>, ArrayRef<llvm::OperandBundleDef>, const llvm::Twine &):\
 Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) ==
Args[i]->getType()) && "Calling a function with a bad signature!"' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210927/041d2874/attachment.html>


More information about the llvm-bugs mailing list