https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93552

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |openacc
                 CC|                            |burnus at gcc dot gnu.org
            Summary|[8/9/10 Regression] ICE in  |[8/9/10
                   |gfc_trans_exit, at          |Regression][OpenACC] ICE in
                   |fortran/trans-stmt.c:6110   |gfc_trans_exit, at
                   |since                       |fortran/trans-stmt.c:6110
                   |r7-6598-g02889d23ee3b0285   |since
                   |                            |r7-6598-g02889d23ee3b0285

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
If one places the "exit" into the outer loop (or jumps via label to the
outermost loop), the compiler complains:
  Error: EXIT statement at (1) terminating !$ACC LOOP loop

As PR 93825 shows, the current code gen in trans-openmp.c's gfc_trans_omp_do
creates a pragma, then a bunch of "for" loops and then translates the code of
the innermost for loop.

For "collapse" any attempt of doing "cycle" to any but the innermost loop – or
any "exit" is rejected.

For "tile", the code handling is the same but "cycle" to outer loops or "exit"
(except exit with label to the outermost loop) is accepted – but then gives an
ICE.

The question is whether "exit" / non-innermost-"cycle" is permitted according
to the OpenACC spec with the "tile" clause. If so, the whole code in
gfc_trans_omp_do needs to be restructured.

Reply via email to