https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107769
Xionghu Luo (luoxhu at gcc dot gnu.org) <yinyuefengyi at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yinyuefengyi at gmail dot com --- Comment #5 from Xionghu Luo (luoxhu at gcc dot gnu.org) <yinyuefengyi at gmail dot com> --- For case c#1: g__r_1 is a global variable changed in function hh, but ipa-prop think it is only loaded by reference without change then removed references in gcc/ipa-prop.cc:propagate_controlled_uses. .wpa.081i.cp: g__r_1/6 (g__r_1) Type: variable definition analyzed Visibility: semantic_interposition prevailing_def_ironly References: Referring: main/7 (addr) kk.constprop.0/16 (addr) kk.part.0.constprop.0/17 (read) Read from file: /tmp/cc3peQfe.o Availability: available Varpool flags: initialized .wpa.085i.inline: ipa-prop: Address IPA constant will reach a load so adding LOAD reference from main/7 to g__r_1/6. ipa-prop: Removed a reference from main/7 to g__r_1/6. ipa-prop: Removing cloning-created reference from kk.constprop/16 to g__r_1/6. ... g__r_1/6 (g__r_1) Type: variable definition analyzed Visibility: semantic_interposition prevailing_def_ironly References: Referring: main/7 (read) main/7 (read) kk.part.0.constprop.0/17 (read) Read from file: /tmp/cc3peQfe.o Availability: available Varpool flags: initialized It seems a bug exposed by r12-2887-ga6da2cddcf0e959d, but maybe actually caused by r12-2523-g13586172d0b70c since it fail to identify globals not read-only...