------- Comment #24 from dave at hiauly1 dot hia dot nrc dot ca 2007-03-19 00:08 ------- Subject: Re: Bootstrap comparison error at revision 122821
> <L11>:; > D.1641_16 = D.1589_4 + -1; > D.1642_15 = ®exp_3(D)->regexp.oneof.regexps[D.1641_16]; > ivtmp___31_21 = (long unsigned int) D.1642_15; > > # ivtmp___31_1 = PHI <ivtmp___31_12(5), ivtmp___31_21(7)> > # i_18 = PHI <i_11(5), i_5(7)> > <L2>:; > D.1592_10 = MEM[index: ivtmp___31_1]; > process_alts_for_forming_states (D.1592_10); > i_11 = i_18 + -1; > if (i_11 >= 0) goto <L0>; else goto <L4>; > > the stage2 compiler then derives a loop trip count based on the size of > the regexp->regexp.oneof.regexps[] array it seems (a size of 3 actually) > and replaces the induction variable by the MEM index. > > This doesn't look like a wrong transformation, but I fail to see how > this could be different from the stage1 and stage2 compiler. > > Zdenek, are we supposed to get a index-only mem-ref? I've reviewed Steve's findings and concur. The index-only mem-ref seemed wierd, so I checked whether it is generated with the third hunk reverted. It is still present with the hunk reverted, so I don't think this is the cause of the problem. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31169