[Bug c++/85441] Empty loops not optimised away

2018-04-18 Thread sebastian321123 at interia dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85441

--- Comment #3 from sebastian321123 at interia dot pl ---
I am afraid that nothing changes with optimisation flags. I am getting the same
results for -O1, -O2, -O3 and -Os

[Bug c++/85441] Empty loops not optimised away

2018-04-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85441

--- Comment #2 from Richard Biener  ---
Confirmed with -fsyntax-only, generating code doesn't change things much.

[Bug c++/85441] Empty loops not optimised away

2018-04-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85441

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||compile-time-hog,
   ||memory-hog
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-17
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
You didn't use any optimization flags, so nothing is optimized away.

But it should be possible to skip evaluation of empty loops inside constant
expression evaluation.