aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2019-03-03 20:24:53 +0000
committerHarald Anlauf <anlauf@gcc.gnu.org>2019-03-03 20:24:53 +0000
commitde06e54d21f8a128289e40f12811b321778f9a8f (patch)
tree4922679636d12497d6e928c09528a0ef247ecba6 /gcc
parentb450b08dfb78d46a64fe73ac4a6ce3aad9ce4baf (diff)
downloadgcc-de06e54d21f8a128289e40f12811b321778f9a8f.zip
gcc-de06e54d21f8a128289e40f12811b321778f9a8f.tar.gz
gcc-de06e54d21f8a128289e40f12811b321778f9a8f.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/symbol.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/pr77583.f9010
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 489ae1bc..9f42349 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index c8a1f84..0eb4130 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -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))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e7b54ea..4e8fd02 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/pr77583.f90 b/gcc/testsuite/gfortran.dg/pr77583.f90
new file mode 100644
index 0000000..c2ee074
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr77583.f90
@@ -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