------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-12 21:26 ------- (In reply to comment #4) > I tried this same program with g95 before I submitted a bug and got what > I thought was the correct results without needing the additional _8 . > Do the standards specify that default precision for constants is kind=4?
Yes. A real constant is of type default real, if no kind suffix is given. Of course, the compiler is free to evaluate mathematical expressions any way it wants, as long as the result is a "mathematical approximation" to the expression, so g95 is not wrong. I assume that this difference between both compilers was added when Steve Kargl changed constant folding to use mpfr and the correct bit widths in all operations, a few months back. > I suppose then that a warning would be good when mixing precisions in > assignments. I agree, but I also agree with Harald Anlauf :-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17927