[EMAIL PROTECTED] ray]$ cat test.cpp #include <stdio.h> #include <stdlib.h> #include <spu_intrinsics.h>
typedef short s16; typedef float f32; typedef vector unsigned char tRTColor; typedef vector float tVector4; const s16 kImageWidth = 4; const s16 kImageHeight = 4; const f32 kWindowWidth = 1.0f; const f32 kWindowHeight = 1.0f; const f32 kNearPlane = -1.0f; const vector float kEye = {0.0f, 0.0f, 0.0f, 1.0f}; void print_vector(char *var, tVector4 val) { printf("Vector %s is: {%f, %f, %f, %f}\n", var, spu_extract(val, 0), spu_extract(val, 1), spu_extract(val, 2), spu_extract(val, 3)); } tRTColor foo(int x, int y, float xx, float yy) { f32 sx = kWindowWidth * (((f32) x) + xx) / ((f32) kImageWidth) - kWindowWidth / 2.0f; f32 sy = kWindowHeight * (((f32) y) + yy) / ((f32) kImageHeight) - kWindowHeight / 2.0f; f32 sz = kNearPlane; f32 sw = 1.0f; tVector4 s = {sx, sy, sz, sw}; print_vector("s", s); } int main(unsigned long long spe_id, unsigned long long program_data_ea, unsigned long long env) { return 0; } [EMAIL PROTECTED] ray]$ spu-gcc test.cpp -O1 spu-gcc: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. [EMAIL PROTECTED] ray]$ spu-gcc --version spu-gcc (GCC) 4.1.1 Copyright (C) 2006 Free Software Foundation, Inc. [EMAIL PROTECTED] ray]$ spu-gcc test.cpp [EMAIL PROTECTED] ray]$ -- Summary: spu-gcc: Internal error with -O1 Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rose at cafwap dot net GCC host triplet: PPC PS3 GCC target triplet: PPC PS3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31909