>Submitter-Id:  net
>Originator:    Matteo Frigo
>Confidential:  no
>Synopsis:      Simple program causes gcc to run out of memory
>Severity:      serious
>Priority:      medium
>Category:      c
>Class:         sw-bug
>Release:       3.4.4 20041218 (prerelease) (Debian 3.4.3-6) (Debian 
>testing/unstable)
>Environment:
System: Linux glauke 2.6.8-powerpc #1 Sun Oct 3 13:22:21 CEST 2004 ppc GNU/Linux
Architecture: ppc

host: powerpc-unknown-linux-gnu
build: powerpc-unknown-linux-gnu
target: powerpc-unknown-linux-gnu
configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr 
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4 
--enable-shared --with-system-zlib --enable-nls --without-included-gettext 
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm 
--enable-java-awt=gtk --disable-multilib --disable-softfloat powerpc-linux
>Description:

A simple program causes gcc to use inordinate amounts of memory
and finally crash.

>How-To-Repeat:

Compile this program as follows:

  gcc-3.4 -maltivec prog.c

prog.c follows:

#include <altivec.h>

vector float foo(vector float a)
{
     return vec_add(a, 
                    vec_add(a, 
                            vec_add(a, 
                                    vec_add(a, a))));
}


>Fix:

Declare explicit temporary variables for the intermediate results.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to