------- Comment #6 from jakub at gcc dot gnu dot org 2010-01-11 09:46 ------- Created an attachment (id=19537) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19537&action=view) gcc45-pr42662.patch
Fix. Regarding the above mentioned patch, it looks like a big hammer, which will create a lot of garbage. Are you sure you have investigated where exactly the sharing originates from? On the line this patch is fixing XEXP (op0, 0) is used twice, once inside the plus and once as the second comparison operand. So it is clearly where the bug is introduced. Another place which also introduces something similar (x*x scalar floating optimization) already uses properly copy_rtx. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42662