This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix infinite recursion with div-by-zero (PR middle-end/70992)


> Eric, any comments?

No objection for the build2_stat hunk, I think it's in keeping with the Ada 
semantics.  But the tree_could_trap_p hunk is certainly an abomination...

> We could also avoid tree_could_trap_p by special-casing only
> *_DIV_EXPR and *_MOD_EXPR
> with integer zero 2nd operand explicitely in build2 given there's no
> "constant" value for this.  That is,
> for FP 1./0. is NaN (a "constant" value) even if the operation might trap.

Yes, that would be faster & simpler and avoids the abomination.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]