> I think INTEGER_NODE should cause a new one to be made via
> build_int_cst_wide so caching is done in the new type and the rest
> should be done via copy_node. Does that sound right to you?
Yep.
OK, thanks for your help. That indeed seems to fix the problem. If it
passes testing, I'll post the patch and check it in.