Hi! On 2020-12-09T12:51:57+0100, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Dec 09, 2020 at 12:36:26PM +0100, Thomas Schwinge wrote: >> Yeah, that re-purposing of 'if_present' made me raise an eyebrow, too. > > I've missed yesterday that the if_present is on the EXEC_OMP_SCAN, not on > some outer EXEC that could be arbitrary
Indeed that's not obvious when seeing the first occurrence: 'c->block->next->next->ext.omp_clauses->if_present = true'. From the second occurrence: case EXEC_OMP_SCAN: /* Flag is only used to checking, hence, it is unset afterwards. */ if (!code->ext.omp_clauses->if_present) gfc_error ("Unexpected !$OMP SCAN at %L outside loop construct with " "%<inscan%> REDUCTION clause", &code->loc); ... it should've been clear -- but at that point I already had raised an eyebrow. ;-) > and as !$omp scan can have only > exclusive and inclusive clauses and nothing else, we can use pretty much > all bool or unsigned :1 flags for that purpose as long as we document it, > and the testcase with if_present on some other construct probably doesn't > buy us much. ACK. Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter