https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109985
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Sam James <sja...@gcc.gnu.org>: https://gcc.gnu.org/g:f0629e32278ef3966c00e889d0c6dce1de6115cc commit r14-10787-gf0629e32278ef3966c00e889d0c6dce1de6115cc Author: Jan Hubicka <hubi...@ucw.cz> Date: Mon Jul 22 23:01:50 2024 +0200 Fix handling of ICF_NOVOPS in ipa-modref As shown in somewhat convoluted testcase, ipa-modref is mistreating ECF_NOVOPS as "having no side effects". This come from time when modref cared only about memory accesses and thus it was possible to shortcut on it. This patch removes (hopefully) all those bad shortcuts. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: PR ipa/109985 * ipa-modref.cc (modref_summary::useful_p): Fix handling of ECF_NOVOPS. (modref_access_analysis::process_fnspec): Likevise. (modref_access_analysis::analyze_call): Likevise. (propagate_unknown_call): Likevise. (modref_propagate_in_scc): Likevise. (modref_propagate_flags_in_scc): Likewise. (ipa_merge_modref_summary_after_inlining): Likewise. (cherry picked from commit efcbe7b985e24ac002a863afd609c44a67761195)