<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The address space is not printed correctly in function parameters"
   href="https://bugs.llvm.org/show_bug.cgi?id=44294">44294</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>The address space is not printed correctly in function parameters
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OpenCL
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>anastasia.stulova@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang looses information about address space of function parameters in some
cases. See examples from review:
<a href="https://reviews.llvm.org/D71272#inline-646266">https://reviews.llvm.org/D71272#inline-646266</a>


void myRead(read_only image1d_t); 
typedef write_only image1d_t img1d_wo;
kernel void k1(img1d_wo img) {
  myRead(img); // expected-error {{passing '__private img1d_wo' (aka '__private
__write_only image1d_t') to parameter of incompatible type '__read_only
image1d_t'}}
}

or

void f_gen(__generic int *arg_gen) {}
void f(){
  __constant int *var_sub;
  f_gen(var_sub); // expected-error {{passing '__constant int *__private' to
parameter of type '__generic int *' changes address space of pointer}}
}

'__private' is not printed in the second type in both cases.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>