[Bug 367853] gcc miscompiles an overflow test when -fwrapv is disabled