http://llvm.org/bugs/show_bug.cgi?id=11605

             Bug #: 11605
           Summary: OpenCL operator && does not accept vector arguments
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


According to the OpenCL standard, this code is supposed to work:

typedef int int2 __attribute__((__ext_vector_type__(2)));
int2 and2(int2 a, int2 b) { return a && b; }

However, clang reports an error:

$ clang --version
clang version 3.1 (trunk 146839)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

$ clang -S and.cl
and.cl:3:38: error: invalid operands to binary expression ('int2' and 'int2')
int2 and2(int2 a, int2 b) { return a && b; }
                                   ~ ^  ~
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to