[TESTCASE] gcc miscompiles Altivec code
Daniel Egger
degger@fhm.edu
Mon Feb 25 14:36:00 GMT 2002
Hija,
I distilled a (not so) small example for code being miscompiled
by gcc from yesterday on linux-ppc.
This one will segfault on my maschine when compiled with -O0.
Note, originally the code was a bit more complex but then I replaced
some additions by assignments in do_something which does the same for
me.
The unused const vector signed short zeros plays quite an important
role here; removing it will make the case pass at -O0. For some reason
gcc is emitting wrong code for a (in this case unused) vector when
creating some register pressure.
I'll check whether the result at -O2 is correct soonish as the code from
which this testcase is derived is miscompiled at -O2 (not segfaulting)
and -O0 (with segfault) and report back later.
--
Servus,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-c
Size: 2029 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020225/d0301194/attachment.bin>
More information about the Gcc
mailing list