This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/48602] Invalid F conversion of G descriptor for values close to powers of 10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602

--- Comment #40 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-04-21 12:44:54 UTC ---
Reply to comment #37

Using volatile does not fix the behavior for the "if" condition. I have tried
several volatile permutations on it as well.  Using "volatile" rather than the
"asm volatile" on the "temp" case does resolve that one and the attached case
"Test program for optimization" (ie declaring temp as volatile)

So, we are stuck at comment #37 at the moment.  This has prompted me to think
"Why are we doing this in floating point to begin with?"  The Fortran Standard
model assumes perfect floating representation. The r and rexp_d could be
represented in exact ascii decimal form and these tests done after we generate
the DTOA string representation of "m".  This would require refactoring our
code, but it could be done I think and the tests would then be a byte scan
which in most cases would exit after a few loop iterations.  I suppose this
would be a bit slower. Regardless, it is an idea I toss out for comment.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]