[4.1/4.0/3.4] fix pr19672 by tuning expansion of TRUTH_{AND,OR}_EXPR

Andrew Haley aph@redhat.com
Thu Oct 20 17:25:00 GMT 2005


Eric Botcazou writes:
 > > Could you please test changing
 > >
 > >   if (BRANCH_COST >= 4)
 > >
 > > to
 > >
 > >   if (BRANCH_COST >= 4
 > >
 > >      || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1)))
 > >
 > > as in the attached patch (which is untested, but should apply to 4.1 and
 > > 4.0 and, with some fuzz, to 3.4 as well)?
 > 
 > I will, but I'd be quite wary of relying exclusively on the side-effects bit.  
 > I think that's far too dangerous for Ada at this point on release branches; 
 > at a very minimum, please revert the change on the 3.4 branch.

I'm wary too.  I think all trapping arithmetic in Java should have
TREE_SIDE_EFFECTS set, but I couldn't swear to it.

Andrew.



More information about the Gcc-patches mailing list