https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61190

Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger at hotmail dot 
de

--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 32879
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32879&action=edit
slightly reduced test case

Acutally also -O1 produces wrong code, and happens to not crash by chance.
Only -O0 and -Og produce correct code.

The constructor Main::Main() first inlined and then completely optimized
away in the dce1 pass.

But even with -fno-tree-dce the constructor seems to be removed in the rtl
passes.
However when I use -fno-ipa-pure-const the sample works at all optimization
levels.

So should we blame "ipa-pure-const"?

Reply via email to