This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code
- From: "sebastian dot huber at embedded-brains dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Oct 2011 07:31:19 +0000
- Subject: [Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code
- Auto-submitted: auto-generated
- References: <bug-38644-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644
--- Comment #54 from Sebastian Huber <sebastian.huber@embedded-brains.de> 2011-10-28 07:31:19 UTC ---
I tested with GCC 4.6.2 and the patch provided by Mikael Pettersson. It works
for -march=armv4t and -march=armv5t, but not for -march=armv5te:
--- test-armv5te.s 2011-10-28 09:22:24.627388063 +0200
+++ test-armv5t.s 2011-10-28 09:22:19.923643155 +0200
@@ -1,4 +1,4 @@
- .arch armv5te
+ .arch armv5t
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
@@ -27,8 +27,8 @@
mov r1, r4
mov r2, #1
bl doStreamReadBlock
- add sp, sp, #8
ldrb r0, [r4]
+ add sp, sp, #8
@ sp needed for prologue
pop {r4, pc}
.size readStream, .-readStream
Command line:
arm-eabi-gcc -O2 -march=armv5t -mthumb -S test.c -o test-armv5t.s
arm-eabi-gcc -O2 -march=armv5te -mthumb -S test.c -o test-armv5te.s