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 fortran/38823] Diagnose and treat (-2.0)**2.0 properly



------- Comment #2 from dominiq at lps dot ens dot fr  2009-01-13 11:30 -------
> The question is whether one needs to reject it completely or only with -std=f95.

I vote for "only with -std=f95" with may be a warning otherwise. I think it is
a legitimate optimization to replace A**B by A**I (with I=B) when B is known to
be an integer, hence to accept negative values for A in this case. I find
upsetting to have to cheat with variables when constant folding does not give
the same result as a similar code with variables.


-- 


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


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