------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-16 20:40 ------- we have: unsigned short foobar; int i = (int)foobar; if (i > 99) if (foobar <= 99) access array[i];
so i can never be negative and foobar will never be greater than 99. This is both a missed optimization dealing with VRP and a diagnostic issue. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Component|c |tree-optimization Ever Confirmed|0 |1 Keywords| |diagnostic, missed- | |optimization Last reconfirmed|0000-00-00 00:00:00 |2008-12-16 20:40:17 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38480