http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48864
Summary: -Ofast should imply -fno-protect-parens
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
-Ofast implies -O3 -ffast-math and possibly some more performance options; it
should also imply -fno-protect-parens
For -Ofast, cf. http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
For -fno-protect-parens,
cf. http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html
That -Ofast implies -fno-protect-parens should also be documented for -Ofast.
An example how drastic the performance depends on -fno-protect-parens is the
following program; it additionally requires -funroll-loops:
http://openmp.org/forum/viewtopic.php?f=3&t=1134#p4565
gfortran timings can be found at
http://openmp.org/forum/viewtopic.php?f=3&t=1134&start=11
http://openmp.org/forum/viewtopic.php?f=3&t=1134&start=11#p4673