------- Comment #2 from laurent at komite dot net  2006-04-11 15:06 -------

(In reply to comment #1)
> Overflow flag set problem:
> 
>   n = -2;
>   n.10 = n;
>   D.2132 = -080000000 / n.10;
> 
> -fwrapv "fixes" the problem.  This is a dup of ...

I'm not sure this is just an overflow problem, it might be more general. As
suggested by a friend, I tried the simple example :

int f (int a, int b)
{
    return (-a) / (-b);
}

The assembly and `-fdump-tree-all' output show that both negations are removed,
which is incorrect since the input domain is not symmetric wrt 0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27116

Reply via email to