[LLVMbugs] [Bug 16434] New: When you use long3 type and dynamic array in one function on MIPS, it will make mistake result.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 24 17:38:57 PDT 2013


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

            Bug ID: 16434
           Summary: When you use long3 type and dynamic array in one
                    function on MIPS,it will make mistake result.
           Product: clang
           Version: 3.3
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: c.royqin at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When you use long3 type and dynamic array in one function on MIPS,it will make
mistake result.
For example:
The following code:
#include <stdio.h>
#ifndef int64_t
typedef long long int64_t;
#endif
typedef int64_t int64_t3 _attribute_((ext_vector_type(3)));
typedef int64_t int64_t4 _attribute_((ext_vector_type(4)));
typedef int64_t3 long3;
typedef int64_t4 long4;
long3 test(int y){
int ay;
long3 tt = (long3)
{0xea3a8109867ff85e,0xc777da6f4eae68ab,0xa771ed50562ceae9}
; return tt;
}
void sample_test()
{ long3 yulei = test(1); printf("******%llx\n",yulei.s0);
printf("******%llx\n",yulei.s1); printf("******%llx\n",yulei.s2); }
int main()
{
sample_test();
return 0;
}
The Expected result is :
******ea3a8109867ff85e
******c777da6f4eae68ab
******a771ed50562ceae9
But the actual result is :
******ea3a8109867ff85e
******c777da6f4eae68ab
******c777da6f4eae68ab
It is a Clang's bug on MIPS.

-- 
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/20130625/c69b9481/attachment.html>


More information about the llvm-bugs mailing list