On 1/20/21 11:44 AM, Jonathan Wakely wrote:
It might have done something, but it didn't optimize anything (and so most of those options were ignored).
Apologies for beating a dead horse, and I'll bow out after this, but when I said "did something" I meant that it solved my problem of wanting an un-optimized binary as per O0 but without instantiation and memory allocation of unused constexpr objects as per O1 and above. Whether that's an optimization or not seems a matter of semantics.
https://gcc.gnu.org/wiki/FAQ#optimization-options
Yes, --help=optimizers with -O1 and adding various permutations of the ones it output is what I did. You've strongly implied that this shouldn't work (assuming the constexpr elimination is done in an optimization pass) so at some point I'll revisit the issue with a current GCC version and report if I find something interesting.
There were some issues with my "O0 plus -f options" so I eventually learned to "bite the bullet" and debug optimized/obfuscated (and that's a good thing) O1 assembly output and didn't work on it further.
-- MARK markrubn@xxxxxxxxx