Created
May 25, 2017 09:50
-
-
Save kaityo256/0878155c2b1e183ecdd3fa103146f794 to your computer and use it in GitHub Desktop.
An example code causing an internal error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| typedef double v4df __attribute__((vector_size(32))); | |
| typedef double v8df __attribute__((vector_size(64))); | |
| template <class T> | |
| void func(T r) { | |
| double *a = (double*)(&r); | |
| for(int i=0;i < sizeof(T)/sizeof(double);i++){ | |
| printf("%.10f ",a[i]); | |
| } | |
| printf("\n"); | |
| } | |
| int | |
| main(void){ | |
| v4df v4z; | |
| v8df v8z; | |
| func(v4z); | |
| func(v8z); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try following options.