[Bug c/31909] New: spu-gcc: Internal error with -O1
rose at cafwap dot net
gcc-bugzilla@gcc.gnu.org
Sat May 12 20:55:00 GMT 2007
[rose@ps3 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;
}
[rose@ps3 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.
[rose@ps3 ray]$ spu-gcc --version
spu-gcc (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
[rose@ps3 ray]$ spu-gcc test.cpp
[rose@ps3 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
More information about the Gcc-bugs
mailing list