------- Comment #1 from jamborm at gcc dot gnu dot org 2008-10-30 17:43 ------- Well, yes, we do generate that code. However, the loop is unrolled later on and the IR code on which the vrp complains later on actually is:
main () { unsigned int ivtmp.27; unsigned int pretmp.17; int pretmp.16; unsigned int pretmp.15; unsigned int anz.0; unsigned int D.1258; char * D.1259; int anz; # BLOCK 2 freq:909 # PRED: ENTRY [100.0%] (fallthru,exec) D.1259_28 = &formatstr[0][0]; printf (&"%d %s\n"[0], 0, D.1259_28); D.1259_39 = &formatstr[0][100]; printf (&"%d %s\n"[0], 1, D.1259_39); D.1259_50 = &formatstr[0][200]; printf (&"%d %s\n"[0], 2, D.1259_50); D.1259_61 = &formatstr[0][300]; printf (&"%d %s\n"[0], 3, D.1259_61); D.1259_72 = &formatstr[0][400]; printf (&"%d %s\n"[0], 4, D.1259_72); D.1259_83 = &formatstr[0][500]; printf (&"%d %s\n"[0], 5, D.1259_83); D.1259_94 = &formatstr[0][600]; printf (&"%d %s\n"[0], 6, D.1259_94); D.1259_105 = &formatstr[0][700]; printf (&"%d %s\n"[0], 7, D.1259_105); D.1259_116 = &formatstr[0][800]; printf (&"%d %s\n"[0], 8, D.1259_116); D.1259_7 = &formatstr[0][900]; printf (&"%d %s\n"[0], 9, D.1259_7); printf (&" %d\n"[0], 10); return 0; # SUCC: EXIT [100.0%] } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861