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 middle-end/59538] Optimization of -O2 or higher creates incorrect code in loop


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).


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