Illegal subtraction in tmp-dive_1.s

Dennis Clarke dclarke at
Thu Apr 16 15:29:27 CEST 2009

> On Wed, 15 Apr 2009, Dennis Clarke wrote:
>> I hit this repeatedly on Solaris x86.
>> Assembler:
>>        "tmp-dive_1.s", line 292 : Illegal subtraction in ... ".DOT-0 -
>> __gmp_binvert_limb_table"
>> cc: assembler failed for tmp-dive_1.s
> Funny, on linux x86_64 with Sun Studio I also got an Illegal subtraction,
> but a different one: the Sun assembler refuses to compute differences of
> symbols in different sections, and x86_64/sqr_basecase.asm does just that.
> Moving "TEXT" before L(jmptab) in the 2 places where it occurs fixes it (I
> know gcc had a similar problem with bug 31713, fixed in 2007) and the
> result passes all tests.
> Could you try with the latest March express compiler to check whether you
> get the same error or a slightly different message?

sorry, no joy :

$ cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2009/03/06
usage: cc [ options] files.  Use 'cc -flags' for details
$ CC -V
CC: Sun Ceres C++ 5.10 SunOS_i386 2009/03/06
Usage: CC [ options ] files.  Use 'CC -flags' for details

/bin/bash ../libtool --mode=compile --tag=CC
../../../gmp-4.3.0/mpn/m4-ccas --m4="m4" /opt/SSX0903/bin/cc -c
-DHAVE_CONFIG_H -I. -I../../../gmp-4.3.0/mpn -I.. -D__GMP_WITHIN_GMP
-I../../../gmp-4.3.0 -DOPERATION_`echo dive_1 | sed 's/_$//'` 
-I/opt/csw/include  -xstrconst -xildoff -erroff=%all -Xa -xnolibmil -Kpic
-xregs=no%frameptr -xlibmieee -xs -xarch=386  `test -f 'dive_1.asm' ||
echo '../../../gmp-4.3.0/mpn/'`dive_1.asm
 ../../../gmp-4.3.0/mpn/m4-ccas --m4=m4 /opt/SSX0903/bin/cc -c
-DHAVE_CONFIG_H -I. -I../../../gmp-4.3.0/mpn -I.. -D__GMP_WITHIN_GMP
-I../../../gmp-4.3.0 -DOPERATION_dive_1 -I/opt/csw/include -xstrconst
-xildoff -erroff=%all -Xa -xnolibmil -Kpic -xregs=no%frameptr -xlibmieee
-xs -xarch=386 dive_1.asm  -fPIC -DPIC -o .libs/dive_1.o
 /opt/SSX0903/bin/cc -c -DHAVE_CONFIG_H -I. -I../../../gmp-4.3.0/mpn -I..
-D__GMP_WITHIN_GMP -I../../../gmp-4.3.0 -DOPERATION_dive_1
-I/opt/csw/include -xstrconst -xildoff -erroff=%all -Xa -xnolibmil -Kpic
-xregs=no%frameptr -xlibmieee -xs -xarch=386 tmp-dive_1.s -fPIC -DPIC -o
        "tmp-dive_1.s", line 232 : Illegal subtraction in ... ".DOT-0 -
cc: fbe failed for tmp-dive_1.s
gmake[2]: *** [dive_1.lo] Error 1
gmake[2]: Leaving directory
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
gmake: *** [all] Error 2

very much the same except we get

     cc: fbe failed for tmp-dive_1.s

with Studio 11 we get

     cc: assembler failed for tmp-dive_1.s


More information about the gmp-discuss mailing list