https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115138

--- Comment #19 from Iain Buclaw <ibuclaw at gcc dot gnu.org> ---
(In reply to Iain Buclaw from comment #18)
> Reduction of opover.d
> ```
> bool __setArrayAllocLength(size_t newLength)
> {
>     import core.checkedint;
>     bool overflow;
>     addu(newLength,
>          addu(0, 0, overflow),
>          overflow);
> 

This is likely not translatable into C/C++. The D FE emits ADD_OVERFLOW()
directly, and swapping this with __builtin_uaddll_overflow is not equivalent -
pulling out the second `addu` to its own local variable means the comparison
failure is not triggered.

Reply via email to