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). Thanks, Richard. > Thanks, > - Tom > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)