* Richard Kenner: > This is wrong (as discussed before) and is likely the cause of PR21573 > (not VRP-related, the expanders for SWITCH_EXPR look at these > attributes, too). I'm not sure if it is safe to delete these > assignment statmeents because TYPE_MIN_VALUE/TYPE_MAX_VALUE are used > quite extensively throught GIGI. > > Well, what *should* they be set to? That is indeed setting them to the > minimum and maximum values as defined by the language.
No, the language (or, more precisely, GNAT) defines them as 0 and 2**size - 1. Otherwise the 'Valid attribute doesn't work. Necessary range checks will be optimized away, too.