------- Comment #4 from rguenth at gcc dot gnu dot org 2008-05-22 14:39 ------- I added gcc.c-torture/execute/20080522-1.c which points at two problems.
First we need to add referenced vars as they come (there is already find_new_referenced_vars and some users, tree-ssa-ccp.c:get_symbol_constant_value needs to do it as well). Second we need to update alias information. This turns out to be a hard problem. For the testcase we need to add 'i' to the symbols SMT.7 aliases and update all statements that reference SMT.7 - which is not easily possible and expensive. We probably also need to update flow-sensitive alias info which is even harder if not impossible. So it looks like this is a dead end sofar, but still the root of the problem remains. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36291