Indeed.  Ada should in this case generate

  R = (T)( (basetype)100 + (basetype)X - (basetype)X )

It does!

i.e. carry out all arithmetic explicitly in the basetype and only for stores
and loads use the subtype.
I'd tend to agree, furthermore, if a pass starts wiping out those
type conversions, then we've got a bug.

Right, the type conversions must not be wiped out, that's a
real issue!

Reply via email to