re PR fortran/77583 (ICE in pp_quoted_string, at pretty-print.c:966)

2019-03-03  Harald Anlauf  <anlauf@gmx.de>
	    Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77583
	* symbol.c (check_conflict): Check for valid procedure name
	passed to error reporting routine.

	PR fortran/77583
	* gfortran.dg/pr77583.f90: New test.


Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>

From-SVN: r269353
This commit is contained in:
Harald Anlauf 2019-03-03 20:24:53 +00:00 committed by Harald Anlauf
parent b450b08dfb
commit de06e54d21
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2019-03-03 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77583
* symbol.c (check_conflict): Check for valid procedure name
passed to error reporting routine.
2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/72714

View File

@ -525,7 +525,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
/* The copying of procedure dummy arguments for module procedures in
a submodule occur whilst the current state is COMP_CONTAINS. It
is necessary, therefore, to let this through. */
if (attr->dummy
if (name && attr->dummy
&& (attr->function || attr->subroutine)
&& gfc_current_state () == COMP_CONTAINS
&& !(gfc_new_block && gfc_new_block->abr_modproc_decl))

View File

@ -1,3 +1,8 @@
2019-03-03 Harald Anlauf <anlauf@gmx.de>
PR fortran/77583
* gfortran.dg/pr77583.f90: New test.
2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/72714

View File

@ -0,0 +1,10 @@
! { dg-do compile }
!
! PR fortran/77583 - ICE in pp_quoted_string, at pretty-print.c:966
! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
pure subroutine sub(s)
contains
pure subroutine s ! { dg-error "conflicts with DUMMY argument" }
end
end