[llvm-bugs] [Bug 19957] OpenCL incorrectly accepts implicit address space conversion with ternary operator

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 21 10:05:52 PDT 2016


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

yaxun.liu at amd.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #21 from yaxun.liu at amd.com ---
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.

-- 
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/20160421/82dada75/attachment.html>


More information about the llvm-bugs mailing list