[llvm-bugs] [Bug 30975] New: Mapping of scalar triggers assertion with enclosed region

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 10 06:25:28 PST 2016


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

            Bug ID: 30975
           Summary: Mapping of scalar triggers assertion with enclosed
                    region
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hahnjo at hahnjo.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code:
void test(int a)
{
  #pragma omp target map(a)
  #pragma omp parallel
  {
    a = 1;
  }
}

compiled with "clang -fopenmp -c map-crash.c" gives me
void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *,
ArrayRef<llvm::Value *>, ArrayRef<OperandBundleDef>, const llvm::Twine &):
Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) ==
Args[i]->getType()) && "Calling a function with a bad signature!"' failed.

Removing the explicit map works fine, but the scalar is then firstprivate by
OpenMP 4.5. defaultmap(tofrom:scalar) surprisingly does not crash either, but I
wonder if its codegen is actually already implemented (I haven't tested the
behaviour).

-- 
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/20161110/0533cd53/attachment.html>


More information about the llvm-bugs mailing list