Bug 51853 - MPFR assertion failure with Python: p >= 2 && p <= ((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1))
Summary: MPFR assertion failure with Python: p >= 2 && p <= ((mpfr_prec_t)((mpfr_uprec...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.6.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 20:58 UTC by Julien ÉLIE
Modified: 2014-03-27 00:52 UTC (History)
1 user (show)

See Also:
Host: hppa-linux-gnu
Target: hppa-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Result of preprocessed file (53.51 KB, application/octet-stream)
2012-01-14 08:13 UTC, Julien ÉLIE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien ÉLIE 2012-01-13 20:58:26 UTC
Hi,

Trying to build Python 2.7.2 (and also 3.2.2) with GCC 4.6.2 and MPFR 3.1.0, I obtain the following error on HP PA-8600 running Debian (it is in
fact gcc61 in the GCC Compile Farm <http://gcc.gnu.org/wiki/CompileFarm>):

/home/iulius/autobuild/bin/gcc-core-4.6.2/bin/gcc -pthread -c  -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -I. -IInclude -I./Include    -DPy_BUILD_CORE -o Objects/longobject.o Objects/longobject.c
init2.c:52: MPFR assertion failed: p >= 2 && p <= ((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1))
Objects/longobject.c: In function 'PyLong_FromString':
Objects/longobject.c:2002:36: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [Objects/longobject.o] Error 1




Configured with: ../gcc-core-4.6.2-src/configure --prefix=/home/iulius/autobuild/bin/gcc-core-4.6.2 --with-gmp=/home/iulius/autobuild/bin/gmp-5.0.2 --with-mpfr=/home/iulius/autobuild/bin/mpfr-3.1.0 --with-mpc=/home/iulius/autobuild/bin/mpc-0.9 --disable-nls --enable-threads=posix --disable-multilib


-- 
Julien
Comment 1 Jonathan Wakely 2012-01-14 01:40:56 UTC
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 2 Julien ÉLIE 2012-01-14 08:12:29 UTC
longobject.i is attached.
Here is the result of "gcc -save-temps":

$ /home/iulius/autobuild/bin/gcc-core-4.6.2/bin/gcc -v -save-temps -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o Objects/longobject.o Objects/longobject.c
Using built-in specs.
COLLECT_GCC=/home/iulius/autobuild/bin/gcc-core-4.6.2/bin/gcc
COLLECT_LTO_WRAPPER=/home/iulius/autobuild/bin/gcc-core-4.6.2/libexec/gcc/hppa2.0-unknown-linux-gnu/4.6.2/lto-wrapper
Target: hppa2.0-unknown-linux-gnu
Configured with: ../gcc-core-4.6.2-src/configure --prefix=/home/iulius/autobuild/bin/gcc-core-4.6.2 --with-gmp=/home/iulius/autobuild/bin/gmp-5.0.2 --with-mpfr=/home/iulius/autobuild/bin/mpfr-3.1.0 --with-mpc=/home/iulius/autobuild/bin/mpc-0.9 --disable-nls --enable-threads=posix --disable-multilib
Thread model: posix
gcc version 4.6.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-pthread' '-c' '-fno-strict-aliasing' '-g' '-O2' '-D' 'NDEBUG' '-g' '-fwrapv' '-O3' '-Wall' '-Wstrict-prototypes' '-I' '.' '-I' 'Include' '-I' './Include' '-D' 'Py_BUILD_CORE' '-o' 'Objects/longobject.o'
 /home/iulius/autobuild/bin/gcc-core-4.6.2/libexec/gcc/hppa2.0-unknown-linux-gnu/4.6.2/cc1 -E -quiet -v -I . -I Include -I ./Include -D NDEBUG -D Py_BUILD_CORE Objects/longobject.c -Wall -Wstrict-prototypes -fno-strict-aliasing -fwrapv -g -g -fworking-directory -O2 -O3 -fpch-preprocess -o longobject.i
ignoring nonexistent directory "/home/iulius/autobuild/bin/gcc-core-4.6.2/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.2/../../../../hppa2.0-unknown-linux-gnu/include"
ignoring duplicate directory "./Include"
#include "..." search starts here:
#include <...> search starts here:
 .
 Include
 /home/iulius/autobuild/bin/gcc-core-4.6.2/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.2/include
 /usr/local/include
 /home/iulius/autobuild/bin/gcc-core-4.6.2/include
 /home/iulius/autobuild/bin/gcc-core-4.6.2/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.2/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-pthread' '-c' '-fno-strict-aliasing' '-g' '-O2' '-D' 'NDEBUG' '-g' '-fwrapv' '-O3' '-Wall' '-Wstrict-prototypes' '-I' '.' '-I' 'Include' '-I' './Include' '-D' 'Py_BUILD_CORE' '-o' 'Objects/longobject.o'
 /home/iulius/autobuild/bin/gcc-core-4.6.2/libexec/gcc/hppa2.0-unknown-linux-gnu/4.6.2/cc1 -fpreprocessed longobject.i -quiet -dumpbase longobject.c -auxbase-strip Objects/longobject.o -g -g -O2 -O3 -Wall -Wstrict-prototypes -version -fno-strict-aliasing -fwrapv -o longobject.s
GNU C (GCC) version 4.6.2 (hppa2.0-unknown-linux-gnu)
	compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.6.2 (hppa2.0-unknown-linux-gnu)
	compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6576c6dbf099889f96aaa25f3debe8a2
init2.c:52: MPFR assertion failed: p >= 2 && p <= ((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1))
Objects/longobject.c: In function 'PyLong_FromString':
Objects/longobject.c:1852:43: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 3 Julien ÉLIE 2012-01-14 08:13:45 UTC
Created attachment 26321 [details]
Result of preprocessed file
Comment 4 Richard Biener 2012-01-16 10:18:45 UTC
This is probably a bug in MPFR.  A testcase needs to be reduced for it
though, looking at the mpfr calls arguments from GCC.
Comment 5 Richard Biener 2012-01-16 10:19:20 UTC
I doubt it's reproducible without a hppa host though.
Comment 6 John David Anglin 2014-03-27 00:52:43 UTC
More recent builds of Python2.7 and MPFR are available in the
Debian unstable archive.  So, I believe this issue is resolved.