<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:yaxun.liu@amd.com" title="yaxun.liu@amd.com">yaxun.liu@amd.com</a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - OpenCL incorrectly accepts implicit address space conversion with ternary operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=19957">bug 19957</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>ASSIGNED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - OpenCL incorrectly accepts implicit address space conversion with ternary operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=19957#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - OpenCL incorrectly accepts implicit address space conversion with ternary operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=19957">bug 19957</a>
              from <span class="vcard"><a class="email" href="mailto:yaxun.liu@amd.com" title="yaxun.liu@amd.com">yaxun.liu@amd.com</a>
</span></b>
        <pre>Bug fixed.

Now emit errors for the testcase:

bad_implicit_address_space_conversion.cl:9:21: error: conditional operator with
the second and third operands of type  ('__global int *' and '__local int *')
which are pointers to non-overlapping address spaces
    int *ptr = cond ? gint : lint;
                    ^ ~~~~   ~~~~
bad_implicit_address_space_conversion.cl:19:27: error: conditional operator
with the second and third operands of type  ('__global int *' and '__local int
*') which are pointers to non-overlapping address spaces
    local int *ptr = cond ? gint : lint;
                          ^ ~~~~   ~~~~
bad_implicit_address_space_conversion.cl:28:28: error: conditional operator
with the second and third operands of type  ('__global int *' and '__local int
*') which are pointers to non-overlapping address spaces
    global int *ptr = cond ? gint : lint;
                           ^ ~~~~   ~~~~
3 errors generated.</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>