Re: [patch] Fix PR middle-end/56474

2013-04-22 Thread Richard Biener
On Fri, Apr 19, 2013 at 11:01 PM, Eric Botcazou wrote: >> Maybe we should detect overflow as if the input and output were signed >> while computing an unsigned result. As far as I can see int_const_binop_1 >> does detect overflow as if operations were signed (it passes 'false' as >> uns to all do

Re: [patch] Fix PR middle-end/56474

2013-04-19 Thread Eric Botcazou
> Maybe we should detect overflow as if the input and output were signed > while computing an unsigned result. As far as I can see int_const_binop_1 > does detect overflow as if operations were signed (it passes 'false' as > uns to all double-int operations rather than TYPE_UNSIGNED). > For exampl

Re: [patch] Fix PR middle-end/56474

2013-04-17 Thread Richard Biener
On Wed, Apr 17, 2013 at 1:12 AM, Eric Botcazou wrote: >> For the C family I found exactly one - the layout_type case, and fixed >> it in the FEs by making empty arrays use [1, 0] domains or signed domains >> (I don't remember exactly). I believe the layout_type change was to make >> Ada happy. >

Re: [patch] Fix PR middle-end/56474

2013-04-16 Thread Eric Botcazou
> For the C family I found exactly one - the layout_type case, and fixed > it in the FEs by making empty arrays use [1, 0] domains or signed domains > (I don't remember exactly). I believe the layout_type change was to make > Ada happy. I'm skeptical, I had to narrow down the initial kludge becau

Re: [patch] Fix PR middle-end/56474

2013-04-15 Thread Richard Biener
On Mon, Apr 15, 2013 at 12:04 PM, Eric Botcazou wrote: >> I think I already rejected this and asked you to fix the users (like >> layout_type is a user). > > Yes, but that would be a pain, there are too many users in the Ada front-end. Users that care about the special casing of 0 - 1 and overfl

Re: [patch] Fix PR middle-end/56474

2013-04-15 Thread Eric Botcazou
> I think I already rejected this and asked you to fix the users (like > layout_type is a user). Yes, but that would be a pain, there are too many users in the Ada front-end. > Clearly 0 - 1 in unsigned arithmetic overflows. Not indicating this may > cause bugs elsewhere as easily as it fixes co

Re: [patch] Fix PR middle-end/56474

2013-04-15 Thread Richard Biener
On Sun, Apr 14, 2013 at 10:05 AM, Eric Botcazou wrote: > Hi, > > this is a regression present on the mainline and 4.8 branch and introduced by > the latest series of sizetype changes. Associated adjustments were made in > the various front-ends for it, most notably Ada which was the most affected

[patch] Fix PR middle-end/56474

2013-04-14 Thread Eric Botcazou
Hi, this is a regression present on the mainline and 4.8 branch and introduced by the latest series of sizetype changes. Associated adjustments were made in the various front-ends for it, most notably Ada which was the most affected, but this issue slipped through the cracks in the form of a b