re PR fortran/66057 (ICE for incomplete generic statement (gfc_match_generic))
authorSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 18 May 2015 23:09:49 +0000 (23:09 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 18 May 2015 23:09:49 +0000 (23:09 +0000)
2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/66057
* decl.c(gfc_match_generic):  Detected a malformed GENERIC statement.

2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/66057
* gfortran.dg/generic_29.f90: New tests.

From-SVN: r223325

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

index f54de3c335b591eb5ac49c24e34896751e279d2a..0650883fd919c418e1c20997da9d35e0129af902 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/66057
+       * decl.c(gfc_match_generic):  Detected a malformed GENERIC statement.
+
 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/66043
index 93a4554343fe34ced41f6030cc5e04c39959c1e6..086a20ea6d89f86dc77d1522a6ea69cb82a07e84 100644 (file)
@@ -8511,6 +8511,11 @@ gfc_match_generic (void)
                gfc_op2string (op));
       break;
 
+    case INTERFACE_NAMELESS:
+      gfc_error ("Malformed GENERIC statement at %C");
+      goto error;
+      break;
+
     default:
       gcc_unreachable ();
     }
index fa8dc0a2086c658a3c44ee6391a951f108b5ad06..5d4dce2e6f9a27b01245f0988bc5b4ac52fa3c9d 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/66057
+       * gfortran.dg/generic_29.f90: New tests.
+
 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/66043
diff --git a/gcc/testsuite/gfortran.dg/generic_29.f90 b/gcc/testsuite/gfortran.dg/generic_29.f90
new file mode 100644 (file)
index 0000000..6f95b56
--- /dev/null
@@ -0,0 +1,11 @@
+! { dg-do compile}
+! PR fortran/66057
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+program p
+   type t
+      contains
+      generic :: ! { dg-error "Malformed GENERIC" }
+   end type
+end