------- Comment #9 from rearnsha at gcc dot gnu dot org 2010-02-24 11:15 ------- I think the real problem here is that shared_const_p thinks that _this_ const expression can't be shared (though I can't see any reason why it couldn't).
The comment in that function says, "CONST can be shared if it contains a SYMBOL_REF. If it contains a LABEL_REF, it isn't sharable", but it then proceeds to check only that the expression is sym+const_int and assumes all other cases are non-shareable. That's really too restrictive. A better check would be that the expression contains no 'label-ref' node. However, there might be some other port that relies on the existing behaviour... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42894