------- Comment #2 from hubicka at gcc dot gnu dot org 2010-09-03 16:33 ------- OK, the problem seems to be that fold_stmt seems to make no serious attempt to fold constant references. There is some code in maybe_fold_reference that seems to partly duplicate fold_const_aggregate_ref however. What is reason for that?
The following patch solves the problem, I am looking what other testcases I can find. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522