2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/69498
* module.c (gfc_match_submodule): Add error
if function is called in the wrong state.
2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
PR fortran/69498
* gfortran.dg/submodule_unexp.f90: Modified test
to account for new error.
* gfortran.dg/submodule_twice.f90: New Test
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r246826
+
+2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
+ Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/69498
+ * module.c (gfc_match_submodule): Add error
+ if function is called in the wrong state.
+
2017-04-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/80046
if (!gfc_notify_std (GFC_STD_F2008, "SUBMODULE declaration at %C"))
return MATCH_ERROR;
+ if (gfc_current_state () != COMP_NONE)
+ {
+ gfc_error ("SUBMODULE declaration at %C cannot appear within "
+ "another scoping unit");
+ return MATCH_ERROR;
+ }
+
gfc_new_block = NULL;
gcc_assert (module_list == NULL);
+2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
+
+ PR fortran/69498
+ * gfortran.dg/submodule_unexp.f90: Modified test
+ to account for new error.
+ * gfortran.dg/submodule_twice.f90: New Test
+
2017-04-10 Jakub Jelinek <jakub@redhat.com>
PR c++/80176
--- /dev/null
+! { dg-do compile }
+! PR fortran/69498
+! This used to ICE
+program main
+ submodule (m) sm ! { dg-error "SUBMODULE declaration at" }
+ submodule (m2) sm2 ! { dg-error "SUBMODULE declaration at" }
+end program
! This used to ICE
program p
type t
- submodule (m) sm ! { dg-error "Unexpected SUBMODULE statement at" }
+ submodule (m) sm ! { dg-error "SUBMODULE declaration at" }
end type
end