[LLVMbugs] [Bug 11605] New: OpenCL operator && does not accept vector arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 17 15:05:12 PST 2011


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: unassignedclangbugs at nondot.org
        ReportedBy: schnetter at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.



More information about the llvm-bugs mailing list