Giovanni Bajo wrote:
Robert Dewar <[EMAIL PROTECTED]> wrote:
Well, the point is that Gigi uses the fields TYPE_MIN/MAX_VALUE in a way which is (now) incorrect, and this causes wrong optimizations. Of course, this might be seen as an evolution (the exact semantics weren't as clear before), but it does not change things.
i may not know enougn here. but i thought that these were fields associated with the type. if so that's a wrong model for ada, where there are two situations: a) constrycts which are allowed to assume in range b) constructs which are not allowed to make this assumption how do wedistinguish these cases. right now, the front end assumes that the backend will essentially assume a) everywhere, and it widens the type in cases b) using unchecked conversions. assuming that uc's should be a barrier to range propagation.
You can either disable the optimization or fix Gigi. I'd also note that you already have SRA disabled, which is an optimization which would be *very* useful to Ada, because of other Gigi bugs.
really not clear to me what the fix is here