[llvm-bugs] [Bug 44176] New: Regression in a29aa47106205ec95c12e0ebac4260c5de878a6a [OpenCL] Move addr space deduction to Sema.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 28 22:26:15 PST 2019


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

            Bug ID: 44176
           Summary: Regression in a29aa47106205ec95c12e0ebac4260c5de878a6a
                    [OpenCL] Move addr space deduction to Sema.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangbugs at nondot.org
          Reporter: drohr at jwdt.org
                CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org

Created attachment 22879
  --> https://bugs.llvm.org/attachment.cgi?id=22879&action=edit
Test case failing to compile

The attached example, that was compiling correctly before
a29aa47106205ec95c12e0ebac4260c5de878a6a, fails to compile with
a29aa47106205ec95c12e0ebac4260c5de878a6a with the command line

clang++ -cl-std=clc++ -x cl -emit-llvm --target=spir64-unknown-unknown
-cl-denorms-are-zero -cl-mad-enable -cl-no-signed-zeros -ferror-limit=1000
-Xclang -finclude-default-header -Dcl_clang_storage_class_specifiers
-Wno-invalid-constexpr -c test.cl -o test.bc

with the following errors

../Merger/GPUTPCGMPolynomialField.h:226:27: error: cannot initialize a
parameter of type 'float *' with an lvalue of type 'float [20]'
  GetPolynomsTrd(x, y, z, f);
                          ^
../Merger/GPUTPCGMPolynomialField.h:198:86: note: passing argument to parameter
'f' here
inline void GPUTPCGMPolynomialField::GetPolynomsTrd(float x, float y, float z,
float f[NTRDM])
                                                                               
     ^
../Merger/GPUTPCGMPolynomialField.h:241:27: error: cannot initialize a
parameter of type 'float *' with an lvalue of type 'float [20]'
  GetPolynomsTrd(x, y, z, f);
                          ^
../Merger/GPUTPCGMPolynomialField.h:198:86: note: passing argument to parameter
'f' here
inline void GPUTPCGMPolynomialField::GetPolynomsTrd(float x, float y, float z,
float f[NTRDM])
                                                                               
     ^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:50:
../Merger/GPUTPCGMPropagator.cxx:59:64: error: cannot initialize a parameter of
type 'float *' with an lvalue of type 'float [3]'
      mField->GetFieldIts(X * cs - Y * sn, X * sn + Y * cs, Z, bb);
                                                               ^~
../Merger/GPUTPCGMPolynomialField.h:269:83: note: passing argument to parameter
'B' here
inline void GPUTPCGMPolynomialField::GetFieldIts(float x, float y, float z,
float B[3]) const
                                                                               
  ^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:50:
../Merger/GPUTPCGMPropagator.cxx:62:64: error: cannot initialize a parameter of
type 'float *' with an lvalue of type 'float [3]'
      mField->GetFieldTrd(X * cs - Y * sn, X * sn + Y * cs, Z, bb);
                                                               ^~
../Merger/GPUTPCGMPolynomialField.h:223:83: note: passing argument to parameter
'B' here
inline void GPUTPCGMPolynomialField::GetFieldTrd(float x, float y, float z,
float B[3]) const
                                                                               
  ^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:50:
../Merger/GPUTPCGMPropagator.cxx:66:61: error: cannot initialize a parameter of
type 'float *' with an lvalue of type 'float [3]'
      mField->GetField(X * cs - Y * sn, X * sn + Y * cs, Z, bb);
                                                            ^~
../Merger/GPUTPCGMPolynomialField.h:167:80: note: passing argument to parameter
'B' here
inline void GPUTPCGMPolynomialField::GetField(float x, float y, float z, float
B[3]) const
                                                                              
^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:50:
../Merger/GPUTPCGMPropagator.cxx:87:31: error: cannot initialize a parameter of
type 'float *' with an lvalue of type 'float [3]'
    GetBxByBz(Alpha, X, Y, Z, B);
                              ^
../Merger/GPUTPCGMPropagator.cxx:31:89: note: passing argument to parameter 'B'
here
       void GPUTPCGMPropagator::GetBxByBz(float Alpha, float X, float Y, float
Z, float B[3]) const
                                                                               
        ^
../Merger/GPUTPCGMPropagator.cxx:159:47: error: cannot initialize a parameter
of type 'float *' with an lvalue of type 'float [3]'
  GetBxByBz(newAlpha, t0.X(), t0.Y(), t0.Z(), B);
                                              ^
../Merger/GPUTPCGMPropagator.cxx:31:89: note: passing argument to parameter 'B'
here
       void GPUTPCGMPropagator::GetBxByBz(float Alpha, float X, float Y, float
Z, float B[3]) const
                                                                               
        ^
../Merger/GPUTPCGMPropagator.cxx:287:48: error: cannot initialize a parameter
of type 'float *' with an lvalue of type 'float [3]'
  GetBxByBz(mAlpha, mT0.X(), mT0.Y(), mT0.Z(), B);
                                               ^
../Merger/GPUTPCGMPropagator.cxx:31:89: note: passing argument to parameter 'B'
here
       void GPUTPCGMPropagator::GetBxByBz(float Alpha, float X, float Y, float
Z, float B[3]) const
                                                                               
        ^
../Merger/GPUTPCGMPropagator.cxx:900:48: error: cannot initialize a parameter
of type 'float *' with an lvalue of type 'float [3]'
  GetBxByBz(mAlpha, mT0.X(), mT0.Y(), mT0.Z(), B);
                                               ^
../Merger/GPUTPCGMPropagator.cxx:31:89: note: passing argument to parameter 'B'
here
       void GPUTPCGMPropagator::GetBxByBz(float Alpha, float X, float Y, float
Z, float B[3]) const
                                                                               
        ^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:74:
../TRDTracking/GPUTRDTracker.cxx:658:49: error: cannot initialize a parameter
of type 'const o2::gpu::My_Float *' (aka 'const float *') with an lvalue of
type 'o2::gpu::My_Float [2]'
            float chi2 = prop->getPredictedChi2(trkltPosTmpYZ, trkltCovTmp);
                                                ^~~~~~~~~~~~~
../TRDTracking/GPUTRDInterfaces.h:264:48: note: passing argument to parameter
'p' here
         float getPredictedChi2(const My_Float p[2], const My_Float cov[3])
const { return PredictChi2(p[0], p[1], cov[0], cov[2]); }
                                               ^
In file included from ../Base/opencl-common/GPUReconstructionOCL.cl:63:
In file included from ../Base/GPUReconstructionIncludesDevice.h:74:
../TRDTracking/GPUTRDTracker.cxx:798:25: error: cannot initialize a parameter
of type 'const o2::gpu::My_Float *' (aka 'const float *') with an lvalue of
type 'o2::gpu::My_Float [2]'
      if (!prop->update(trkltPosUp, trkltCovUp)) {
                        ^~~~~~~~~~
../TRDTracking/GPUTRDInterfaces.h:257:37: note: passing argument to parameter
'p' here
         bool update(const My_Float p[2], const My_Float cov[3])

-- 
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/20191129/67e75bbd/attachment-0001.html>


More information about the llvm-bugs mailing list