re PR fortran/88376 (ICE in is_illegal_recursion, at fortran/resolve.c:1689)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Thu, 10 Jan 2019 01:11:51 +0000 (01:11 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Thu, 10 Jan 2019 01:11:51 +0000 (01:11 +0000)
2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88376
* resolve.c (is_illegal_recursion): Remove an assert().

2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88376
* gfortran.dg/pr88376.f90: New test.

From-SVN: r267793

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr88376.f90 [new file with mode: 0644]

index 9a030c81656e88023f2c1c2141a0ac495637d4f4..d96f2c1ff2e59ac79a6b9e76a62640be69c382c4 100644 (file)
@@ -1,13 +1,16 @@
+2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/88376
+       * resolve.c (is_illegal_recursion): Remove an assert().
+
 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
 
        PR other/16615
-
        * expr.c: Change "can not" to "cannot".
 
 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
 
        PR other/16615
-
        * class.c: Mechanically replace "can not" with "cannot".
        * decl.c: Likewise.
        * expr.c: Likewise.
index a681ecaf2497dc12d6421a93823ef8b5f2d306d0..d18f2d8aefacff327902e5611ff5a99ac50cb523 100644 (file)
@@ -1686,8 +1686,6 @@ is_illegal_recursion (gfc_symbol* sym, gfc_namespace* context)
       || gfc_fl_struct (sym->attr.flavor))
     return false;
 
-  gcc_assert (sym->attr.flavor == FL_PROCEDURE);
-
   /* If we've got an ENTRY, find real procedure.  */
   if (sym->attr.entry && sym->ns->entries)
     proc_sym = sym->ns->entries->sym;
index fc8395f76f63457d943c67344abdbf5ef9dbf8e5..a1786d101f5af94545e06148f8ecb6c60496b581 100644 (file)
@@ -1,7 +1,11 @@
+2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/88376
+       * gfortran.dg/pr88376.f90: New test.
+
 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
 
        PR other/16615
-
        * g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace
        "can not" with "cannot".
        * gfortran.dg/common_15.f90: Likewise.
diff --git a/gcc/testsuite/gfortran.dg/pr88376.f90 b/gcc/testsuite/gfortran.dg/pr88376.f90
new file mode 100644 (file)
index 0000000..5dd0181
--- /dev/null
@@ -0,0 +1,8 @@
+! { dg-do compile }
+module m
+   integer :: n
+contains
+   subroutine s
+      character(n(3)) :: c  ! { dg-error "not a function" }
+   end
+end