[gomp4] Fix an ICE involving OpenACC routines inside broken fortran functions.

Cesar Philippidis cesar@codesourcery.com
Thu Apr 27 22:04:00 GMT 2017


I encountered an ICE when the fortran FE tries to parse an OpenACC
routine directive when the containing function has a syntax error. E.g.

  integer function f1

is missing an argument list, so the fortran FE will not create a
function symbol for f1. Consequently, the OpenACC routine parser cannot
register the routine directive with any function, so it hit a
gcc_unreachable.

This patch replaces that gcc_unreachable with a match_error. While the
syntax of the routine directive may be correct, it is still an error to
have a dangling acc routine directive not associated with a function.

I've applied this patch to gomp-4_0-branch.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gomp4-broken-routine-ice.diff
Type: text/x-patch
Size: 1234 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170427/0e5dfda2/attachment.bin>


More information about the Fortran mailing list