[Bug middle-end/59538] Optimization of -O2 or higher creates incorrect code in loop
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Tue Dec 17 22:28:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59538
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Also, is there a directive that I can use to explicitly tell GCC
> to not remove a loop (without having to resort to a compiler flag
> which is global, printing a variable, or using the 'volatile' keyword
> which de-optimizes the caching of the target variable)? Thanks!
Try to print i instead of NTH! The basic way to avoid the removal of loops in a
benchmark is to consume in some way some of the computed data (in some cases
the optimizer may even be clever than you think).
More information about the Gcc-bugs
mailing list