------- Comment #20 from rguenth at gcc dot gnu dot org 2010-02-14 22:25 ------- Not TREE_ADDRESSABLE var _OBJC_CLASS_REFERENCES_0 Not TREE_ADDRESSABLE var _OBJC_SELECTOR_REFERENCES_0 Not TREE_ADDRESSABLE var _OBJC_SELECTOR_REFERENCES_1 read-only var _OBJC_CLASS_REFERENCES_0 read-only var _OBJC_SELECTOR_REFERENCES_0 read-only var _OBJC_SELECTOR_REFERENCES_1
So it's indeed ipa-reference that promotes the static vars and CCP that propagates the initializer. I see nothing wrong here, so the ObjC frontend must do something behind the middle-ends back. If you look at the final assembler code, is there anything modifying the contents of those three variables? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43061