Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Richard Sandiford
Eric Botcazou writes: >> Maybe add the comments to tree.def instead. > > Good idea, revised patch attached. > > > * tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak > comments. > (TRUNC_MOD_EXPR, CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR): > Add comments

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 3:06 PM, Eric Botcazou wrote: >> Maybe add the comments to tree.def instead. > > Good idea, revised patch attached. Ok. Thanks, Richard. > > * tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak > comments. > (TRUNC_MOD_EXPR, CEIL_MOD_

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Eric Botcazou
> Maybe add the comments to tree.def instead. Good idea, revised patch attached. * tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak comments. (TRUNC_MOD_EXPR, CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR): Add comments on sign of the result.

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 9:24 AM, Eric Botcazou wrote: >> So the only question is whether or not the CEIL_MOD_EXPR and >> ROUND_MOD_EXPR bits are right. I'm confident the change to >> FLOOR_MOD_EXPR is right. > > OK. > >> Do we have any reasonable way to test CEIL_MOD_EXPR & ROUND_MOD_EXPR? > > No

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Eric Botcazou
> So the only question is whether or not the CEIL_MOD_EXPR and > ROUND_MOD_EXPR bits are right. I'm confident the change to > FLOOR_MOD_EXPR is right. OK. > Do we have any reasonable way to test CEIL_MOD_EXPR & ROUND_MOD_EXPR? Note that the patch makes the function punt on those 2 so it can do

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Jeff Law
On 10/20/2015 04:00 PM, Joseph Myers wrote: On Tue, 20 Oct 2015, Jeff Law wrote: 2015-10-20 Eric Botcazou * fold-const.c (tree_binary_nonnegative_warnv_p) : Recurse on operand #1 instead of operand #0. : Do not recurse. : Likewise. Isn't this a function of t

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Joseph Myers
On Wed, 21 Oct 2015, Eric Botcazou wrote: > > Isn't this a function of the language and in some cases isn't it > > implementation defined (true for C/C++ until C++11)? > > I don't think that C/C++ use FLOOR_MOD_EXPR, only Ada does AFAIK. In any > case, I don't see how this can be implementation

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Eric Botcazou
> Isn't this a function of the language and in some cases isn't it > implementation defined (true for C/C++ until C++11)? I don't think that C/C++ use FLOOR_MOD_EXPR, only Ada does AFAIK. In any case, I don't see how this can be implementation-defined given: /* Division for integer result that

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Joseph Myers
On Tue, 20 Oct 2015, Jeff Law wrote: > > 2015-10-20 Eric Botcazou > > > > * fold-const.c (tree_binary_nonnegative_warnv_p) : > > Recurse on operand #1 instead of operand #0. > > : Do not recurse. > > : Likewise. > Isn't this a function of the language and in some cases isn't it

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Jeff Law
On 10/20/2015 10:33 AM, Eric Botcazou wrote: Hi, this test started to fail recently as the result of the work of Richard S., but the underlying issue had been latent for a long time. It boils down to this excerpt from the VRP1 dump file: Found new range for _9: [0, 12] marking stmt to be not s

[patch] Fix failure of ACATS c45503c at -O2

2015-10-20 Thread Eric Botcazou
Hi, this test started to fail recently as the result of the work of Richard S., but the underlying issue had been latent for a long time. It boils down to this excerpt from the VRP1 dump file: Found new range for _9: [0, 12] marking stmt to be not simulated again Visiting statement: _3 = _9 %