This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 19990223 trunk build runs around in circles in insn_first_p in rtlanal.c compiling 1500+ line Fortran source :-)


> !       if (INSN_UID (p) < max_uid_for_loop
> ! 	  && INSN_UID (q) < max_uid_for_loop)
> ! 	return INSN_LUID (p) < INSN_LUID (q);
> ! 
> !       /* Start with test for not first so that INSN == REFERENCE yields not
> !          first.  */
> !       if (q == insn || ! p)
> !         return 0;
> !       if (p == reference || ! q)
> !         return 1;

... and that's the wrong order.  If INSN_UID (p) >= max_uid_for_loop,
INSN_UID (reference) < max_uid_for_loop, and NEXT_INSN (p) == reference,
we get the wrong result in the next iteration.

Therefore, the equality tests have to precede the unequality tests.

I would make a new diff if I could connect to egcs.cygnus.com .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]