[PATCH] Fix PR77765

Jakub Jelinek jakub@redhat.com
Thu Jun 29 17:36:00 GMT 2017


On Thu, Jun 29, 2017 at 08:54:54AM -0700, Cesar Philippidis wrote:
> 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

> 2017-06-29  Cesar Philippidis  <cesar@codesourcery.com>
> 
> 	PR fortran/77765
> 	gcc/fortran/
> 	* openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
> 	comparing the routine name against it.
> 
> 	gcc/testsuite/
> 	* gfortran.dg/goacc/pr77765.f90: New test.

Ok, thanks.

	Jakub



More information about the Fortran mailing list