Bug 8703 - Compiler Segmentation Fault cross-compiling PPC Altivec accelerated code
Summary: Compiler Segmentation Fault cross-compiling PPC Altivec accelerated code
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Aldy Hernandez
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-11-25 08:46 UTC by vtaylor
Modified: 2003-08-25 14:44 UTC (History)
2 users (show)

See Also:
Host: i686-pc-cygwin
Target: powerpc-wrs-vxworks
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
small2.nas_gemp_f.i.gz (1.15 MB, application/x-gzip )
2003-05-21 15:16 UTC, vtaylor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vtaylor 2002-11-25 08:46:04 UTC
Internal Compiler error at line 1090 under any optimization level. Segment Faults.

$ powerpc-wrs-vxworks-gcc --save-temps -Wall -include "altivec.h" -B/dna/ppc-gcc/i686/vxworks/lib/gcc-lib -D_AltiVec -D__VXWORKS__
 -fno-builtin -mstrict-align -mabi=altivec -maltivec -mcpu=7400 -mvxworks -O0 -mregnames  -DCPU=PPC604  -DRW_MULTI_THREAD -Id:/Torn
ado/target/h  -It:/opt/gedae/gedae_sys_4.0/include  -It:/opt/gedae/gedae_sys_4.0/include/embeddable -I ../../../../VSIPL-1.5.0/src/
include -DM_PI=3.14159265358979323846 -DM_PI_2=1.57079632679489661923 -DM_PI_4=0.78539816339744830962 -DM_PIl=3.1415926535897932384
626433832795029L -DM_PI_2l=1.5707963267948966192313216916397514L -DM_PI_4l=0.7853981633974483096156608458198757L  -c      -I../../.
./../VSIPL-1.5.0/src/include/auto -I../../../../VSIPL-1.5.0/src/include -I../../../src/include -o small2.nas_gemp_f.o small2.nas_ge
mp_f.c
small2.nas_gemp_f.c: In function `nas_gempnn_f':
small2.nas_gemp_f.c:38: warning: comparison between signed and unsigned
small2.nas_gemp_f.c:40: warning: comparison between signed and unsigned
small2.nas_gemp_f.c:42: warning: comparison between signed and unsigned
small2.nas_gemp_f.c:1090: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
gcc version 3.3 20021118 (experimental)

Environment:
 Configured with: ../../src/gcc-core/configure --disable-shared --disable-multilib --enable-languages=c --with-gnu-as --with-gnu-ld --target=powerpc-wrs-vxworks --with-newlib --prefix=/dna/ppc-gcc/i

Cygwin 1.3.13 hosted on Windows NT 4.0 Update 6, vxWorks 5.4 target platformm , Hardware Dell Optiplex GX110 Pentium 3 256 MB RAM, 600MHZ,

How-To-Repeat:
Compile File
Comment 1 vtaylor 2002-11-25 08:46:04 UTC
Fix:
Unknown
Comment 2 David Edelsohn 2002-12-05 12:28:04 UTC
Responsible-Changed-From-To: unassigned->aldyh
Responsible-Changed-Why: Altivec
Comment 3 Aldy Hernandez 2002-12-05 18:44:43 UTC
From: Aldy Hernandez <aldyh@redhat.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, vtaylor@dna-cs.com
Cc:  
Subject: Re: c/8703: Compiler Segmentation Fault cross-compiling PPC Altivec accelerated code
Date: Thu, 5 Dec 2002 18:44:43 -0800

 It looks like you have a complicated expression that's expanding in
 such a way that it's running out of memory.  The file *is* 441megs
 after all.
 
 Could you simplify the testcase to its bare minimum, and perhaps send
 an *un*preprocessed source (with header files of course).
 
 Aldy
Comment 4 Wolfgang Bangerth 2003-02-02 22:56:20 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: Aldy already asked for feedback, so let's reflect this in
    the state of this report:
    ------------------------
    It looks like you have a complicated expression that's expanding in
     such a way that it's running out of memory.  The file *is* 441megs
     after all.
     
     Could you simplify the testcase to its bare minimum, and perhaps send
     an *un*preprocessed source (with header files of course).
Comment 5 Dara Hazeghi 2003-06-02 04:51:18 UTC
Hello,

would it be possible for you to check whether this problem still occurs under gcc mainline? Aldy's 
done a lot of work fixing Altivec bugs, so it'd be good to know whether this was one of them. 
Thanks,

Dara
Comment 6 Andrew Pinski 2003-06-02 04:57:22 UTC
Actually I think this bug is still there because gcc is expanding many macros, a 
workaround is to use tempary variables, this will also speed up the compile.

Also send the *un*preprocessed source file.
Comment 7 vtaylor 2003-06-02 15:50:32 UTC
Subject: RE:  Compiler Segmentation Fault cross-compiling PPC Altivec accelerated code

I will double check with the new line.   I am not sure what temporary
variables you mean?  Could you enlighten me?

> -----Original Message-----
> From: pinskia@physics.uc.edu [mailto:gcc-bugzilla@gcc.gnu.org]
> Sent: Sunday, June 01, 2003 11:57 PM
> To: vtaylor@dna-cs.com
> Subject: [Bug c/8703] Compiler Segmentation Fault cross-compiling PPC
> Altivec accelerated code
>
>
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8703
>
>
>
> ------- Additional Comments From pinskia@physics.uc.edu
> 2003-06-02 04:57 -------
> Actually I think this bug is still there because gcc is expanding
> many macros, a
> workaround is to use tempary variables, this will also speed up
> the compile.
>
> Also send the *un*preprocessed source file.
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>

Comment 8 Andrew Pinski 2003-06-02 15:54:25 UTC
instead of vec_stx(vec_add(vec_ld(...),vec_ld(...)),..) do 
vector int temp = vec_ld(...);
vector int temp1 = vec_ld(...);
vector int temp2 = vec_add(temp, temp1);
vec_stx(temp,..);
Comment 9 Andrew Pinski 2003-08-07 02:04:05 UTC
We need the non preprocessed source file.
It will be called something.c.
Comment 10 Andrew Pinski 2003-08-25 14:44:57 UTC
No feed back in 3 months (T-8 days) plus this really has been in waiting for the 
unpreprocessed source file for over 6 months.