This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve PR30911 and PR31023, Ada and VRP
Hi,
> So I see only harm in the current non-existing middle-end semantics
> of integral sub-types. Thus I recommend to disallow using them
> for variables exposed to the middle-end.
I have to agree, it is all just too error prone. How about having
the Ada front-end add ASSERT_EXPR's (or maybe an equivalent builtin)
at points where it knows an interesting bound? Unlike the current
situation, these should mean what they say: the value is guaranteed
to be in the range. As such they wouldn't apply to uninitialized
variables and so forth, which would remove the need for a VRP barrier
like VIEW_CONVERT_EXPR.
Ciao,
Duncan.