MPIR-2.5.1 doesn't compile with GCC-4.7.0 on ia64

19 views
Skip to first unread message

Jeroen Demeyer

unread,
Mar 28, 2012, 3:17:25 AM3/28/12
to mpir-devel
On ia64 systems, MPIR-2.5.1 fails to compile with GCC-4.7.0:

$ uname -a
Linux cleo 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:57:09 EST 2009 ia64
ia64 ia64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7.0/ia64-Linux-rhel/libexec/gcc/ia64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: ia64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.7.0/src/gcc-4.7.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-as=/usr/local/binutils-2.22/ia64-Linux-rhel-gcc-4.6.2/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.22/ia64-Linux-rhel-gcc-4.6.2/bin/ld
--with-gmp=/usr/local/mpir-2.5.1/ia64-Linux-rhel-gcc-4.6.2
--with-mpfr=/usr/local/mpfr-3.1.0/ia64-Linux-rhel-mpir-2.5.1-gcc-4.6.2
--with-mpc=/usr/local/mpc-0.9/ia64-Linux-rhel-mpir-2.5.1-mpfr-3.1.0-gcc-4.6.2
--prefix=/usr/local/gcc-4.7.0/ia64-Linux-rhel
Thread model: posix
gcc version 4.7.0 (GCC)

$ ./configure && make
checking build system type... ia64-unknown-linux-gnu
checking host system type... ia64-unknown-linux-gnu
[...]
/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo
divrem_eucl
idean_r_1 | sed 's/_$//'` -O2 -c -o divrem_euclidean_r_1.lo
divrem_euclidean_r_1.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
-D__GMP_WITHIN_GMP -I.. -DOPERATION_divrem_euclidean_r_1 -O2 -c
divrem_euclidea
n_r_1.c -fPIC -DPIC -o .libs/divrem_euclidean_r_1.o
divrem_euclidean_r_1.c: In function '__gmpn_mod_1_k':
divrem_euclidean_r_1.c:157:5: error: 'asm' operand requires impossible
reload
make[2]: *** [divrem_euclidean_r_1.lo] Error 1
make[2]: Leaving directory `/home/jdemeyer/cleo/mpir-2.5.1/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jdemeyer/cleo/mpir-2.5.1'
make: *** [all] Error 2

Full log is attached.

mpir-cleo.log

Bill Hart

unread,
Mar 28, 2012, 5:18:11 AM3/28/12
to mpir-...@googlegroups.com
This error seems to occur when compiling the .c file. Yet the
complaint is about the generated assembly. My first reaction is that
this is a compiler bug and should be reported to the GCC folks.

It does seem to have detected the processor correctly.

Unfortunately this file is not in GMP. However, one should be able to
verify that it is a compiler issue by compiling a previous version of
MPIR that contained this file. As we know MPIR compiled fine with
previous GCC releases on that platform, this should give us good
confidence that it is indeed the compiler.

Bill.

> --
> You received this message because you are subscribed to the Google Groups "mpir-devel" group.
> To post to this group, send email to mpir-...@googlegroups.com.
> To unsubscribe from this group, send email to mpir-devel+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.
>

Jeroen Demeyer

unread,
Mar 28, 2012, 5:36:16 AM3/28/12
to mpir-...@googlegroups.com
On 2012-03-28 11:18, Bill Hart wrote:
> However, one should be able to
> verify that it is a compiler issue by compiling a previous version of
> MPIR that contained this file.
I don't see why that is relevant, but anyway:

* MPIR-2.1.3 fails, same error

* MPIR-1.3.1 fails, same error

* MPIR-1.0 fails, similar error in a different file:


/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99

-DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo
sqr_basecase | sed 's/_$//'` -O3 -c -o sqr_basecase.lo sqr_basecase.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I..
-DOPERATION_sqr_basecase -O3 -c sqr_basecase.c -fPIC -DPIC -o
.libs/sqr_basecase.o
sqr_basecase.c: In function '__gmpn_sqr_basecase':
sqr_basecase.c:268:5: error: 'asm' operand requires impossible reload
sqr_basecase.c:268:5: error: 'asm' operand requires impossible reload

* GMP-5.0.4 also fails:


/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo

dcpi1_div_qr | sed 's/_$//'` -O2 -pedantic -mtune=itanium2 -c -o
dcpi1_div_qr.lo dcpi1_div_qr.c


libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..

-D__GMP_WITHIN_GMP -I.. -DOPERATION_dcpi1_div_qr -O2 -pedantic
-mtune=itanium2 -c dcpi1_div_qr.c -fPIC -DPIC -o .libs/dcpi1_div_qr.o
dcpi1_div_qr.c: In function '__gmpn_dcpi1_div_qr':
dcpi1_div_qr.c:141:8: error: 'asm' operand requires impossible reload

Jeroen Demeyer

unread,
Mar 28, 2012, 5:43:42 AM3/28/12
to mpir-...@googlegroups.com

Bill Hart

unread,
Mar 28, 2012, 5:53:45 AM3/28/12
to mpir-...@googlegroups.com
I think 1.3.1 is about the version this file was added. But the fact
that a similar error shows up in a different file strongly implies it
is a compiler bug.

Bill.

On 28 March 2012 10:43, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
> Could be this:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52657
>

Bill Hart

unread,
Mar 28, 2012, 7:01:18 AM3/28/12
to mpir-...@googlegroups.com
Yes, that looks like it.

On 28 March 2012 10:43, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:

leif

unread,
Mar 28, 2012, 7:33:19 AM3/28/12
to mpir-...@googlegroups.com

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So it's clearly not related to the /MPIR/ version.


-leif

--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail

Bill Hart

unread,
Mar 28, 2012, 7:35:02 AM3/28/12
to mpir-...@googlegroups.com
Excellent!

Reply all
Reply to author
Forward
0 new messages