This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/23098] New: [4.1 Regression] store of 0.0 to float
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2005 18:47:14 -0000
- Subject: [Bug rtl-optimization/23098] New: [4.1 Regression] store of 0.0 to float
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following program:
int g (float* g1)
{
*g1 = 0;
}
Running it on ppc-darwin on the mainline (with -static), we get:
LC0:
.long 0
.text
.align 2
.globl _g
_g:
lis r2,ha16(LC0)
lfs f0,lo16(LC0)(r2)
stfs f0,0(r3)
blr
On 4.0.0, we get:
_g:
li r0,0
stw r0,0(r3)
blr
x86 have the same problem but only with -fPIC but that is not a regression:
.LC0:
.long 0
.text
.p2align 4,,15
.globl g
.type g, @function
g:
call __i686.get_pc_thunk.cx
addl $_GLOBAL_OFFSET_TABLE_, %ecx
movl 4(%esp), %eax
movl .LC0@GOTOFF(%ecx), %edx
movl %edx, (%eax)
ret
--
Summary: [4.1 Regression] store of 0.0 to float
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: minor
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23098