Bug 29230 - [4.1 regression] gcc-4.1 generates faulty asm on ARM when compiling openmsx 0.6.1 with -O3
Summary: [4.1 regression] gcc-4.1 generates faulty asm on ARM when compiling openmsx 0...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: 4.1.2
Assignee: Paul Brook
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-25 22:52 UTC by Debian GCC Maintainers
Modified: 2006-09-27 17:11 UTC (History)
3 users (show)

See Also:
Host:
Target: arm-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-26 14:17:17


Attachments
test case (1.11 KB, text/plain)
2006-09-26 13:21 UTC, Martin Michlmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2006-09-25 22:52:44 UTC
[forwarded from http://bugs.debian.org/385505]

sorry for the vague report, didn't reproduce that report yet.

gcc-4.1 fails to build openmsx 0.6.1 from source when compiled with -O3.
Experimenting with debian/ARM installed in qemu revealed that 
compiling with -O2 -funswitch-loops -fgcse-after-reload -ffast-math
-funroll-loops works fine.
This seems to point towards the the -finline-functions option.

More detailed concerning this bug can be found in openmsx bugreport
http://bugs.debian.org/385197 .
Comment 1 Andrew Pinski 2006-09-25 22:58:59 UTC
Not enough information.
Comment 2 Martin Michlmayr 2006-09-26 09:20:14 UTC
I'll try to take a look.
Comment 3 Martin Michlmayr 2006-09-26 13:21:13 UTC
(sid)40:tbm@usurper: ~] arm-linux-gnu-g++ -c YMF262.c
(sid)41:tbm@usurper: ~] arm-linux-gnu-g++ -c -O2 YMF262.c
(sid)42:tbm@usurper: ~] arm-linux-gnu-g++ -c -O3 YMF262.c
/tmp/ccnnwFsk.s: Assembler messages:
/tmp/ccnnwFsk.s:83: Error: bad immediate value for offset (4104)
/tmp/ccnnwFsk.s:84: Error: bad immediate value for offset (4104)
zsh: exit 1     arm-linux-gnu-g++ -c -O3 YMF262.c
(sid)43:tbm@usurper: ~]
(sid)44:tbm@usurper: ~] arm-linux-gnu-g++ -c -O2 YMF262.c
(sid)45:tbm@usurper: ~] arm-linux-gnu-g++ -c -O2 -finline-functions YMF262.c
/tmp/ccBUO5HO.s: Assembler messages:
/tmp/ccBUO5HO.s:83: Error: bad immediate value for offset (4104)
/tmp/ccBUO5HO.s:84: Error: bad immediate value for offset (4104)
zsh: exit 1     arm-linux-gnu-g++ -c -O2 -finline-functions YMF262.c
(sid)46:tbm@usurper: ~]

This is with 4.1.2 20060926.
Comment 4 Martin Michlmayr 2006-09-26 13:21:37 UTC
Created attachment 12329 [details]
test case
Comment 5 Martin Michlmayr 2006-09-26 13:37:26 UTC
This doesn't happen with gcc 4.2, nor, apparently, with 4.0.
Comment 6 Martin Michlmayr 2006-09-26 13:58:20 UTC
Yes, 4.0 works, so it's really only a problem in 4.1.
Comment 7 Paul Brook 2006-09-27 17:10:00 UTC
Subject: Bug 29230

Author: pbrook
Date: Wed Sep 27 17:09:40 2006
New Revision: 117253

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117253
Log:
2006-09-27  Paul Brook  <paul@codesourcery.com>

	PR target/29230
	gcc/
	* config/arm/arm.md (arith_adjacentmem): Handle large offsets.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.md

Comment 8 Paul Brook 2006-09-27 17:10:39 UTC
Subject: Bug 29230

Author: pbrook
Date: Wed Sep 27 17:10:22 2006
New Revision: 117254

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117254
Log:
2006-09-27  Paul Brook  <paul@codesourcery.com>

	PR target/29230
	Backport from mainline.
	* config/arm/arm.md (arith_adjacentmem): Handle large offsets.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/arm/arm.md

Comment 9 Paul Brook 2006-09-27 17:11:35 UTC
Fixed.