This is the mail archive of the
mailing list for the GCC project.
Re: [TESTCASE] Minimized testcase for AltiVec segfault
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Daniel Egger <degger at fhm dot edu>
- Cc: GCC Developer Mailinglist <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Feb 2002 15:52:05 +1100
- Subject: Re: [TESTCASE] Minimized testcase for AltiVec segfault
> the attached testcase will segfault on powerpc-linux when compiled with
> egger@sonja:~$ /opt/gcc/bin/gcc -da -maltivec -save-temps -O0 -mregnames
first, you can't possibly do -maltivec and not do -mabi=altivec.
who knows what will happen.
second, it would probably better if you configured with --enable-altivec.
did you do that? if so, you don't need to pass -maltivec or
lastly... i can't reproduce on either darwin or ppc linux.
if the above suggestions don't fix it, someone else needs to take a look
at it, because i sure can't reproduce it.
> #include <altivec.h>
> #include <malloc.h>
> do_something (signed short *mem)
> const vector signed short zeros = (vector signed short)
> vector signed short *vec;
> vector signed short v1;
> vec = (vector signed short *) mem;
> v1 = vec;
> vec = v1;
> main (void)
> void *mem = memalign (128, 16);
> if (mem)
> do_something (mem);
> free (mem);
> return 0;
Aldy Hernandez E-mail: email@example.com
Professional Gypsy Lost in Australia
Red Hat, Inc.