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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to