[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#627084: gcc-4.6: miscompile PARI/GP SVN revision 12000



Package: gcc-4.6
Version: 4.6.0-7
Severity: normal

Hello Debian GCC Maintainers,

gcc 4.6 on Debian/amd64 miscompiles PARI/GP SVN revision 12000:

Step to reproduce:

wget 'http://pari.math.u-bordeaux.fr/~bill/pari-2.4.3.12000.tar.gz'
tar xf pari-2.4.3.12000.tar.gz
cd pari-2.4.3.alpha
./Configure
make gp
make bench

Result: all test suite fail.

Cause: 

The function pari_init_parser() in the file src/language/parsec.h is miscompiled.
(This file is included by src/language/parse.y).

If you replace the line 43: s_node.n=OPnboperator; by parsestate_reset(); 
(which does the same thing), then all test pass.

It seems that the issue is that the function stack_alloc() is not inlined correctly,
which cause pari_tree to be NULL (or maybe the call to pari_inline inside stack_alloc()
is not inlined correctly.

The command line used is
gcc-4.6  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer    -I. -I../src/headers -fPIC -o
parse.o ../src/language/parse.c

It also happens with -O2, but not with -O3 -fno-inline.

It works fine with gcc 4.3, 4.4 and 4.5.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 



Reply to: