public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31909]  New: spu-gcc: Internal error with -O1
@ 2007-05-12 20:55 rose at cafwap dot net
  2007-05-12 21:00 ` [Bug c/31909] " rose at cafwap dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rose at cafwap dot net @ 2007-05-12 20:55 UTC (permalink / raw)
  To: gcc-bugs

[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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/31909] spu-gcc: Internal error with -O1
  2007-05-12 20:55 [Bug c/31909] New: spu-gcc: Internal error with -O1 rose at cafwap dot net
@ 2007-05-12 21:00 ` rose at cafwap dot net
  2007-05-12 21:06 ` [Bug target/31909] " pinskia at gcc dot gnu dot org
  2007-05-12 21:22 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rose at cafwap dot net @ 2007-05-12 21:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rose at cafwap dot net  2007-05-12 21:59 -------
[rose@ps3 ray]$ rpm -qa | grep spu
spu-newlib-3.3-72
spu-binutils-3.3-72
spu-gdb-3.3-72
spu-gcc-c++-3.3-72
cell-spu-timing-2.0-3
spu-simdmath-2.0-6
spu-gcc-3.3-72


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31909


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/31909] spu-gcc: Internal error with -O1
  2007-05-12 20:55 [Bug c/31909] New: spu-gcc: Internal error with -O1 rose at cafwap dot net
  2007-05-12 21:00 ` [Bug c/31909] " rose at cafwap dot net
@ 2007-05-12 21:06 ` pinskia at gcc dot gnu dot org
  2007-05-12 21:22 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-12 21:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-05-12 22:06 -------
This works on the trunk with spu-elf so closing as works for me as that is the
first official support for spu-elf.  Note I will file this with IBM later today
once I am able to reproduce the ICE.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c                           |target
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31909


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/31909] spu-gcc: Internal error with -O1
  2007-05-12 20:55 [Bug c/31909] New: spu-gcc: Internal error with -O1 rose at cafwap dot net
  2007-05-12 21:00 ` [Bug c/31909] " rose at cafwap dot net
  2007-05-12 21:06 ` [Bug target/31909] " pinskia at gcc dot gnu dot org
@ 2007-05-12 21:22 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-12 21:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-05-12 22:22 -------
This also works on the trunk of IBM sources (and Sony's) too so I am not filing
a bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31909


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-12 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12 20:55 [Bug c/31909] New: spu-gcc: Internal error with -O1 rose at cafwap dot net
2007-05-12 21:00 ` [Bug c/31909] " rose at cafwap dot net
2007-05-12 21:06 ` [Bug target/31909] " pinskia at gcc dot gnu dot org
2007-05-12 21:22 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).