The following testcase fails on powerpc64-linux with GCC mainline starting sometime after 2005-05-05 01:24 UTC: long a, b; void foo () { a = b + 2147483647L; } int main () { foo (); return 0; } elm3b11% /opt/gcc-nightly/mline/bin/gcc -m64 -O0 -g bug.c /tmp/ccwXjSlP.o(.text+0x28): In function `foo': /home/janis/work/bug.c:6: undefined reference to `__adddi3' collect2: ld returned 1 exit status It looks like a problem with this patch from geoffk on 2005-05-05: http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00232.html This affects SPEC CPU2000 tests bzip2, eon, and gzip built without optimization.
confirmed
Also on powerpc64-darwin.
This is caused by Geoff's mode macros patch: http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00392.html addsi3 and adddi3 had different operand predicates, but the patch combined the patterns, using the addsi3 predicate. sub<mode>3 uses a helper, but add<mode>3 does not. testing a patch...
Subject: Bug 21477 CVSROOT: /cvs/gcc Module name: gcc Changes by: dje@gcc.gnu.org 2005-05-09 22:04:53 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.md Log message: PR target/21477 * config/rs6000/rs6000.md (add_op2): New. (add<mode>3): Use it. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8695&r2=2.8696 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.366&r2=1.367
Fixed.