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 target/33391] [4.3 regression] gfortran.dg/do_3.F90 fails at -O2



------- Comment #4 from burnus at gcc dot gnu dot org  2007-09-11 15:34 -------
> > -fstrict-overflow
> > Allow the compiler to assume strict signed overflow rules, depending on the
> > language being compiled.
> Well, I think the "depending on the language being compiled" is important. I
> think the testcase is valid Fortran, and shouldn't fail whatever the
> optimization level you use.

I'm not sure; for -O2 maybe not but for -O3? If one takes overflows (integer,
floating point variables), +/-Inf, NaN (only fp) fully into account, many
optimizations are no longer possible.

Example:  "if (i + 10 > 20)"; should this be optimized to "if(i > 10)" or not?
And if yes, starting from which optimization level?

See also (for FP math):
http://gcc.gnu.org/wiki/GeertBosch


-- 


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


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