On Thu, Jun 21, 2012 at 12:34:32AM -0700, Jason Merrill wrote:
> All the tests in the libgomp and gcc testsuites pass with this
> patch, but I'm not very confident about it because I don't fully
> understand what the code is doing.  In particular, I'm not sure what
> the condition controlling the code in tsubst_omp_for_iterator that
> looks at the clauses should be; init can never be a DECL_EXPR at
> that point anymore.

Don't remember exactly, but I'd guess I wanted to preserve as much as
possible what the code was doing before for the non-class types.
After RECUR init can't be DECL_EXPR, right?  So if you do it unconditionally
it doesn't need to be handled.

> I'm also not sure whether moving the begin_omp_structured_block is
> necessary, but it seemed like a good idea since we're handling the
> DECL_EXPR earlier.

Looking at the code now, I wonder whether begin_omp_structured_block
shouldn't be moved later, not earlier, because the decl ctors should happen
before the body of the worksharing region.  But if it works as you wrote,
I'm fine with it, I think the testsuite coverage should catch problematic
cases.

        Jakub

Reply via email to