Fix PR85782: C++ ICE with continue statements inside acc loops

Cesar Philippidis cesar@codesourcery.com
Tue May 15 14:43:00 GMT 2018


This patch resolves the issue in PR85782, which involves a C++ ICE
caused by OpenACC loops which contain continue statements. The problem
is that genericize_continue_stmt expects a continue label for the loop,
but that wasn't getting set up acc loops. This patch fixes that by
calling genericize_omp_for_stmt for OACC_LOOP statements, because
OACC_LOOP and OMP_FOR statements are almost identical at this point of
parsing.

I regression tested it on x86_64-linux with nvptx offloading.

Is this ok for trunk and the stable branches?  The patch for the stable
branches is slightly different, because cp_genericize_r uses if
statements to check for statement types instead of a huge switch statement.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunk-pr85782.diff
Type: text/x-patch
Size: 1705 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180515/3e6b3663/attachment.bin>


More information about the Gcc-patches mailing list