https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103830
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- I think the recent modref change made the function const. And no, we shouldn't DSE any volatile store and generally we don't. It's probably some side-effect of modref that we do. Using -fno-ipa-pure-const "fixes" this bug with -Og: local analysis of void MyClass::call()/1 NULL memory access; terminating BB Function is locally const. callgraph: so it's caused by the recent change to mitigate path-isolation damage to modref.