[Bug fortran/70198] simple test floating point sequence gives incorrect values-- optimizer changes them
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 11 20:59:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70198
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2016-03-11
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #4 from kargl at gcc dot gnu.org ---
Seems that the code may be broken.
% gfc6 -g -finit-real=ZERO -ffpe-trap=invalid -o z a.f
% ./z
<a lot of output removed>
Minf= 3.50 Shock angle(deg)=17.664 Cone half-angle(deg)=12.41
***Soln only valid for ThetaC<ThetaCmax***
***(i.e., no detached shock cases)***
Log written to file "cone.dat"
% gfc6 -g -finit-real=SNAN -ffpe-trap=invalid -o z a.f
% ./z
Input free-stream Mach and shock angle(deg)[<70 deg]
-----------------------------------------------------------
Solution to Taylor-Maccoll equation for conical flow follows:
theta= 17.66 M= 3.40246 P/P0= 0.01507 T/T0= 0.30163 Rho/Rho0= 0.04997
Floating exception (core dumped)
% gdb710 z
Program received signal SIGFPE, Arithmetic exception.
0x0000000000400f4a in runge (n=2, y=..., f=..., x=0.308207691,
h=-0.000174532921, m=2, k=1) at a.f:178
178 y(i)=y(i)+a*(f(i)*h-q(i))
a appears to be uninitialized.
More information about the Gcc-bugs
mailing list