This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve PR30911 and PR31023, Ada and VRP


> That said, it is not clear exactly what is allowed when there is a bounded
> error.  For example, the Ada reference manual seems to require that
> uninitialized values behave deterministically.  Suppose X is uninitialized
> (using it is then a bounded error).  In the following code
>   if X = 0 then
>     do_something_with_X;
>   end if;
> must X have the value 0 in do_something_with_X?  

> I think this was Bob Duff's point.

Yes.  The Ada RM "seems" to require this.  One could argue that it doesn't
definitely, but since Bob was one of the two authors of that document, a
lot of deference should be given to his position.

> In fact, even without VRP this might be a problem: do gcc's constant
>  propagation passes turn
>   ...X unitialized...
>   if X = 0 then use_X; end if;
> into
>   if true then use_X; end if; (without X being "true" in use_X)
> for example?

Not as far as I know.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]