------- Comment #7 from law at redhat dot com  2006-03-27 20:31 -------
Subject: Re:  [4.2 Regression] ACATS c35507m
        cd2a23e cxh1001 failures

On Mon, 2006-03-27 at 20:12 +0000, laurent at guerby dot net wrote:

> 
> I don't know how it goes through gigi and the BE but the check
> 
> system__unsigned_types__unsigned!(A) in 4 .. 5
> 
> must not go away. May be the front-end is wrong in using function 
> c35507m__char
> as input type for the parameter though.
And this is the heart of why I'm not a fan of Ada's type
representation.   We have an object, A with a defined type
which only allows the values 4 & 5.   However, we have a
program which effectively demands that we put the value 3
into A.


VRP is doing exactly what it should be doing with the code it's
being presented.  Ada needs to either pass A in a different
type, or use some other kind of conversion mechanism which
doesn't allow VRP to propagate range information from the
parameter.  I've never looked closely, but VIEW_CONVERT_EXPR
may be what you want rather than a NOP_EXPR or CONVERT_EXPR.

jeff


-- 


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

Reply via email to