[ was: Re: [PATCH] Check NULL loop->latch in verify_loop_structure ] On 23/11/15 11:28, Richard Biener wrote: > On Mon, 23 Nov 2015, Tom de Vries wrote: > >> Hi, >> >> In verify_loop_structure, we stop checking the latch once we find that it's >> NULL. >> >> This patch tries a bit harder: >> - if !LOOPS_MAY_HAVE_MULTIPLE_LATCHES, we don't allow a NULL latch >> - if LOOPS_MAY_HAVE_MULTIPLE_LATCHES, we check that indeed there's no >> single loop latch. >> >> As a consequence of adding this check, I needed to fix expand_omp_for_generic, >> which missed an initialization of a loop latch. >> >> Bootstrapped and reg-tested on x86_64. >> >> OK for stage3 trunk? > > You miss to catch the case where loop->latch is non-NULL but there > are multiple latches, so I think the patch can be improved. > That case is more important for correctness (passes > seeing ->latch non-NULL assume a single latch). > Updated according to comment. Bootstrapped and reg-tested on x86_64. OK for stage3 trunk? Thanks, - Tom