Re: Question on signed overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/18/2010 02:59 PM, Georg Lay wrote:
> Andrew Haley schrieb:
> 
>>> As i386 doesn' define an abs insn, you won't see this warning on i386
>>> simply because ABS rtx is never generated. I see the second warning for
>>> ABS >= 0 on ARM. However, for ARM there is no ABS rtx genereited either,
>>> even though arm BE defines abs insn.
>>
>> The bug, then, is that this abs should never have been generated.
>>
>>> I think the evil thing is that RTL optimizers do transformations whose
>>> correctness depend on the signedness/qualifiers of the operand(s)
>>> without even knowing anything about signedness/qualifiers.
>>
>> I don't think so: abs() is not defined on unsigned operands.
> 
> So the problem locates either in ifcvt.c:noce_try_abs() or in
> optabs.c:expand_abs_nojump() because they do not handle flag_trapv resp.
> flag_strict_overflow correctly.

I think the problem may be in the front end: I don't think that the
tree optimizations are supposed to generate illegal code from legal
code.

> Is this worth a bug report?

Definitely.

> The point is that no one else can reproduce it because it shows up on a
> non-standard machine.

Yes, that's awkward.  It'd be nice if we could reproduce it elsewhere.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux