https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96749
--- Comment #1 from Dmitry Bazhenov <bazhenov.dn at gmail dot com> --- Created attachment 49101 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49101&action=edit statement-has-no-effect.cpp Code snippet revealing the problem.