On -ftrapv vs. libcalls...

Joern Rennecke joern.rennecke@superh.com
Tue Aug 31 18:28:00 GMT 2004


> Note the __mulvdi3 libcall.  At the first opportunity to do so, the
> first jump pass, we collapse it to a normal MULT insn:

Which is actually a bug.  basic arithmetic traps on signed overflow with
-ftrapv.  There is no place for the trap_if side effect in the REG_EQUAL
note, hence these operations are unsuitable to wrap then with
REG_LIBCALL / REG_RETVAL / REG_EQUAL (at least in their current form).



More information about the Gcc mailing list