https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109985
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Created attachment 55180 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55180&action=edit untested patch It turns out that as modref was written for memory loads/stores only and later side effects discovery was retrofitted, I forgot to revisit code handling CONST and NOVOPS together. There are quite few places where we can not short-circuit on NOVOPS and be sure we merge in the side effects and determinism flags.