This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
When compiling a C++ source file with arm-linux-g++ 3.3.1 with -O2 switch, an assembler error of bad immediate value for offset (4116) was encountered. See attached compiler output file (jamdist.txt), preprocessed file (t1isdnpriapp_zapapp.ii), and assembly file (t1isdnpriapp_zapapp.s) for details.
Created an attachment (id=6628) [edit] compiler output
Created an attachment (id=6629) [edit] preprocessed file and assembly file
GNU C++ version 3.3.1 (arm-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-81). GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31866 /opt/gnu/bin/../lib/gcc-lib/arm-linux/3.3.1/../../../../arm-linux/bin/as - march=armv3 -march=armv3 - o /home/chenw/mts/work/hst/apps/t1isdnpriapp/src/debug_arm/T1IsdnPriApp_ZapApp.o T1IsdnPriApp_ZapApp.s T1IsdnPriApp_ZapApp.s: Assembler messages: T1IsdnPriApp_ZapApp.s:61034: Error: bad immediate value for offset (4116) arm-linux-g++ -c - o /home/chenw/mts/work/hst/apps/t1isdnpriapp/src/debug_arm/T1IsdnPriApp_ZapApp.o -Wall -fsigned-char -D_ARM_ -fno-exceptions -fPIC -DPIC -DHST -march=armv3 - D_NO_EX -D_ALT_NS=0 -D_STLP_NO_OWN_NAMESPACE -D_STLP_NO_EXCEPTION_HEADER - gstabs+3 -fno-exceptions -D_ARM_ -save-temps -v -DNO_EXCEPTION_HANDLING - march=armv3 -D_NO_EX -D_ALT_NS=0 -D_STLP_NO_OWN_NAMESPACE - D_STLP_NO_EXCEPTION_HEADER -O2 - I/home/chenw/mts/work/hst/apps/t1isdnpriapp/src - I/home/chenw/mts/work/hst/apps/t1isdnpriapp/include - I/home/chenw/mts/work/hst/apps -I/home/chenw/mts/work/hst/modules - I/home/chenw/mts/work/hst/modules/ant5compat/include - I/home/chenw/mts/work/hst/modules/bertauto/include - I/home/chenw/mts/work/hst/modules/bertptest/include - I/home/chenw/mts/work/hst/modules/bertrx/include - I/home/chenw/mts/work/hst/modules/berttx/include - I/home/chenw/mts/work/hst/generic/dbg/include - I/home/chenw/mts/work/hst/modules/ds1auto/include - I/home/chenw/mts/work/hst/modules/ds1loop/include - I/home/chenw/mts/work/hst/modules/ds1rx/include - I/home/chenw/mts/work/hst/modules/ds1t1231/include - I/home/chenw/mts/work/hst/modules/ds1tx/include - I/home/chenw/mts/work/hst/platform/hardware/include - I/home/chenw/mts/work/hst/modules/hdlcrx/include - I/home/chenw/mts/work/hst/modules/hdlctx/include - I/home/chenw/mts/work/hst/modules/isdn -I/home/chenw/mts/work/hst/modules - I/home/chenw/mts/work/hst/generic/libmeasfr/include - I/home/chenw/mts/work/hst/generic/libmessage/include - I/home/chenw/mts/work/hst/generic/libparam/include - I/home/chenw/mts/work/hst/modules/modcom/include - I/home/chenw/mts/work/hst/generic/os/include - I/home/chenw/mts/work/hst/modules/testmod/include - I/home/chenw/mts/work/hst/modules/guiSetups/include - I/home/chenw/mts/work/hst/modules/t1input/include - I/home/chenw/mts/work/hst/modules/t1level/include - I/home/chenw/mts/work/hst/modules/t1output/include - I/home/chenw/mts/work/hst/modules/timedtest/include - I/home/chenw/mts/work/hst/generic/std/include - I/home/chenw/mts/work/hst/generic/stream/include - I/home/chenw/mts/work/hst/modules/vfrx/include - I/home/chenw/mts/work/hst/modules/dspbase/include - I/home/chenw/mts/work/hst/generic/zap/include - I/home/chenw/mts/work/hst/generic/libdir/include - I/home/chenw/mts/work/hst/modules/t1sige/include -I/opt/stlport/STLport- 4.6.2/stlport /home/chenw/mts/work/hst/apps/t1isdnpriapp/src/T1IsdnPriApp_ZapAp p.cpp
Is this a duplicate of PR10730? If so, gcc-3.3.4 is said to contain a fix. I'm still seeing this kind of problem in gcc-3.4.2, though.
*** Bug 17209 has been marked as a duplicate of this bug. ***
The problem is the arith_adjacent_mem pattern, which is sometimes expanding to more than three instructions if the addressed objects are in the stack frame. Patch in testing.
Subject: Bug 16201 CVSROOT: /cvs/gcc Module name: gcc Changes by: rearnsha@gcc.gnu.org 2005-02-01 14:07:03 Modified files: gcc : ChangeLog gcc/config/arm : arm.c arm-protos.h Log message: PR target/16201 * arm.c (arm_eliminable_register): New function. (adjacent_mem_locations): Don't allow eliminable registers. Use HOST_WIDE_INT for address offsets. * arm-protos.h (arm_eliminable_register): Add prototype. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7360&r2=2.7361 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&r1=1.427&r2=1.428 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm-protos.h.diff?cvsroot=gcc&r1=1.80&r2=1.81
Subject: Bug 16201 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: rearnsha@gcc.gnu.org 2005-02-01 15:07:05 Modified files: gcc : ChangeLog gcc/config/arm : arm-protos.h arm.c Log message: PR target/16201 * arm.c (arm_eliminable_register): New function. (adjacent_mem_locations): Don't allow eliminable registers. Use HOST_WIDE_INT for address offsets. * arm-protos.h (arm_eliminable_register): Add prototype. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.790&r2=2.2326.2.791 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm-protos.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.61&r2=1.61.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.317.4.8&r2=1.317.4.9
Fixed