This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35946] [4.3, 4.4 regression] wrong result with array constructor as argument to ATAN2
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Apr 2008 09:15:06 -0000
- Subject: [Bug fortran/35946] [4.3, 4.4 regression] wrong result with array constructor as argument to ATAN2
- References: <bug-35946-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from ubizjak at gmail dot com 2008-04-17 09:15 -------
The difference between non-working (---) and working (+++) asm is:
--- pr35946.s_ 2008-04-17 11:07:19.000000000 +0200
+++ pr35946.s 2008-04-17 11:07:28.000000000 +0200
@@ -188,7 +188,7 @@
.p2align 3
.L16:
movl A.7.603(%ebx), %eax
- fildl 4(%edi,%ebx)
+ fildl (%edi,%ebx)
fstps 4(%esp)
movl %eax, (%esp)
call atan2f
The problem can be seen in .003.t.orignal:
S.12 = 1;
while (1)
{
if (S.12 > 10) goto L.4;
dda1[S.12 + -1] = __builtin_atan2f (A.7[S.12 + -1], (real(kind=4))
(*(integer(kind=4)[10] *) atmp.8.data)[S.12]);
S.12 = S.12 + 1;
}
Please note off-by one in the last index.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35946