------- Comment #35 from rguenth at gcc dot gnu dot org 2008-02-10 22:08 ------- The source is very likely a type mismatch in the IL (the foldings are correct, but also strictly unneccessary). In principle it goes as follows. We have a comparison
op0 OP op1 where op0 and op1 are required to be trivially convertible to each other. Now we look up the definition of any of op0 or op1, where their RHS are required to be trivially convertible to their LHS and so the RHSes are trivially convertible to each other. Thus we don't need the conversion - for the final IL that is - but since fold likes to have more precise types we convert either operand to the type of the other before calling fold. So far goes the theory - of course it all breaks down if one of the above assumption does not hold. I will have a look. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2008-02-10 13:45:55 |2008-02-10 22:08:45 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33992