[PATCH] handle OpenMP/OpenACC regions inside Fortran character functions (PR85703)

Cesar Philippidis cesar_philippidis@mentor.com
Wed Jun 13 14:06:00 GMT 2018


Character variables in Fortran are slightly different than reals and
integers because they can represent a single character or a string of
them. Consequently, due their nature, the Fortran resolver requires more
information to preform error checking on them.

PR85703 exposed an ICE when an OpenACC or OpenMP region is nested inside
a Fortran character function. I've isolated the problem down to the
gfc_matching_function not being reset on entry to decode_oacc_directive
or decode_omp_directive. Usually decode_statement resets that variable,
but both OpenACC and OpenMP have their own statement decoders, and
therein lies the problems. The fix is to reset gfc_matching_function
early in those functions.

Is this OK for trunk and GCC 8?

Thanks,
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-pr85703.patch
Type: text/x-patch
Size: 2345 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180613/fd3361da/attachment.bin>


More information about the Gcc-patches mailing list