On Fri, 6 Mar 2009, Richard Guenther wrote: > Ok, I didn't think of generating optimal code for the overflow checks, > but it should be reasonably possible to if-convert the explicit > overflow checks back to builtins that can be specially expanded > (that would also help explicit overflow checks in source code).
It looks like only alpha and pa presently have insn patterns such as addvsi3 that would be used by the present -ftrapv code, but I expect several other processors also have instructions that would help in overflow-checking code. (For example, Power Architecture has versions of many arithmetic instructions that set overflow flags, so such instructions could be used followed by conditional traps.) -- Joseph S. Myers jos...@codesourcery.com