After bootstrapping and regtesting the variant Richard requested, here is what i am checking in: 2008-10-20 Daniel Berlin * tree-ssa-pre.c (insert_into_preds_of_block): Don't rewrite constant part of expression. Sorry about the delay On Sat, Oct 18, 2008 at 1:51 PM, Richard Guenther wrote: > On Sat, Oct 18, 2008 at 7:19 PM, Daniel Berlin wrote: >> On Sat, Oct 18, 2008 at 6:27 AM, Richard Guenther >> wrote: >>> On Sat, Oct 18, 2008 at 4:02 AM, Daniel Berlin wrote: >>>> I'm currently testing the following, which at least doesn't crash on >>>> the minimized testcase i produced :) >>> >>> Looking at that patch I wonder if >>> >>> - if (TREE_TYPE (constant) != type) >>> + if (!useless_type_conversion_p (type, TREE_TYPE (constant))) >>> >>> will also work. >> >> Probably, but we really shouldn't just willy nilly replace one with >> the other anyway. :) >> >> If you like, i can try both :) > > Yes please ;) > >> At worst what is going to happen is that we will call fold_convert a >> few more times than necessary, and in very strange cases (where >> converting one constant to the other requires a real conversion), >> create a small amount of necessary code. > > Well, IMHO every time we hit this type-not-compatible case there should > be a bug elsewhere ... > > Richard. > >>> >> >