------- Comment #3 from baldrick at free dot fr 2006-03-23 13:19 ------- I've had a look at c35507m. I think it's a front-end bug. The problem occurs in this type support subprogram:
C35507M.CHARRP (A, F) { if ((system__unsigned_types__unsigned) A - 4 <= 1) { return (integer) ((system__unsigned_types__unsigned) A - 4); } else { if ((boolean) F) { __gnat_rcheck_06 ("c35507m.adb", 39); } else { } return -1; } The type of A is c35507m__char, which has [TYPE_MIN, TYPE_MAX] = [4,5]. Given this, VRP correctly eliminates the range check. The code seems to be generated by the front-end in exp_attr.adb, around line 3849. Ciao, Duncan. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26797