https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119312
--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Indeed at IPA level we track if address of a symbol is taken, but we do not keep any extra info about how it may be used. It would be useful to track 1) if address is used only to read (to figure out readonly vars) 2) if there are no compares with other addresses (to enable more ICF) I probably should get to that next stage1. If I understand Joseph's reply right, we may infer const qualifier on variables consisting of structures with only const fields and no padding? I guess that would be useful thing to do in some cases.