[llvm-bugs] [Bug 33244] New: Vector literal construction from smaller vectors does not work as documented

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 31 03:31:24 PDT 2017


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

            Bug ID: 33244
           Summary: Vector literal construction from smaller vectors does
                    not work as documented
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Jochen.Wilhelmy at tomtom.com
                CC: llvm-bugs at lists.llvm.org

The following minimal example does not work as documented:


typedef float float2 __attribute__((ext_vector_type(2)));
typedef float float4 __attribute__((ext_vector_type(4)));
int main() {
    float4 vf = (float4)((float2)(1.0f, 2.0f), (float2)(3.0f, 4.0f));
}


The documentation says it should work:
https://clang.llvm.org/docs/LanguageExtensions.html#vector-literals

It was tested with Clang HEAD 5.0.0 in https://wandbox.org/ (also Clang 3.8 on
Ubuntu)

It would be nice if this could be fixed as I expect it works when in OpenCL
mode and therefore should be easy to fix.

-- 
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/20170531/a3e78035/attachment.html>


More information about the llvm-bugs mailing list