[PATCH] Fix PR77765

Cesar Philippidis cesar_philippidis@mentor.com
Thu Jun 29 15:55:00 GMT 2017


PR77765 exposed an ICE triggered in gfortran's acc routine parser by an
uninitialized proc_name. That situation occurred because the function
containing the acc routine directive has an error, so
gfc_current_ns->proc_name was never set.

Although it could be argued that the acc routine parser should not run
if any errors have been detected inside the routine containing such a
directive, this patch just teaches gfc_match_oacc_routine to check for
the existence of gfc_current_ns->proc_name before comparing the
procedure's name with the routine name specified by the user.

Is this patch OK for trunk and gcc7?

Thanks,
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr77765.diff
Type: text/x-patch
Size: 1573 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170629/a1cb91b2/attachment.bin>


More information about the Gcc-patches mailing list