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

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 19 15:29:00 GMT 2011


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

--- Comment #33 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-04-19 15:28:56 UTC ---
In response to Comment #30:

One solution seems to be to take away "static inline" for the function:

double calculate_exp(int d)
{
  int i;
  double r = 1.0;
  for (i = 0; i< (d >= 0 ? d : -d); i++)
    r *= 10;
  r = (d >= 0) ? r : 1.0 / r;
  return r;
}

We could put that behind some compiler directives looking for -m32 or similar.

I will have to find the correct #ifdefine



More information about the Gcc-bugs mailing list