This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43716] [4.6/4.7/4.8 Regression] Revision 158105 miscompiles doduc.f90
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Jul 2012 12:16:42 +0000
- Subject: [Bug tree-optimization/43716] [4.6/4.7/4.8 Regression] Revision 158105 miscompiles doduc.f90
- Auto-submitted: auto-generated
- References: <bug-43716-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43716
--- Comment #34 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-21 12:16:42 UTC ---
Maybe no problem with gcc at all:
Compile doduc.f90 with -g -O3 -ffast-math -ffpe-trap=invalid
Starting program: /home/uros/pb11/lin/source/a.out
MAIN : FIN S00002
MAIN : FIN S00001
MAIN : FIN S00011
MAIN : FIN S00022
Program received signal SIGFPE, Arithmetic exception.
0x0000000000402a71 in s00018 (i12=0, i21=0, iorg=0) at doduc.f90:3789
3789 & dtpa = 2.*sens*DABS(TMI(k)/DTMi(k))
(gdb) disass
0x0000000000402a4f <+431>: movsd 0x229e61(%rip),%xmm3 # 0x62c8b8
<aaa11_+856>
0x0000000000402a57 <+439>: movsd %xmm3,0x100(%rsp)
0x0000000000402a60 <+448>: movsd 0x21c790(%rip),%xmm3 # 0x61f1f8
<aaa77_+19416>
0x0000000000402a68 <+456>: movsd 0x100(%rsp),%xmm6
=> 0x0000000000402a71 <+465>: divsd %xmm3,%xmm0
0x0000000000402a75 <+469>: addsd %xmm6,%xmm6
0x0000000000402a79 <+473>: andpd %xmm1,%xmm3
0x0000000000402a7d <+477>: andpd %xmm1,%xmm0
(gdb) i r xmm3 xmm0
xmm3 0
xmm0 0
To me, it looks like invalid test. Any fortraners here to share their opinion?