Hello again,
I forgot to add the test case this patch fixes and to give Paul the
credit. Attached the new test case.
Nicolas
New & improved changelog:
2017-04-10 Nicolas Koenig <koeni...@student.ethz.ch>
Paul Thomas <pa...@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 <koeni...@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
On 04/10/2017 06:53 PM, Nicolas Koenig wrote:
Hello everyone,
Dominique send me this patch written by Paul some time ago. For some
reason it was never committed, so here we go :)
Ok for trunk?
Nicolas
Regression tested for x86_64-pc-linux-gnu.
Changelog:
2017-03-18 Nicolas Koenig <koeni...@student.ethz.ch>
PR fortran/69498
* module.c (gfc_match_submodule): Add error
if function is called in the wrong state.
2017-03-18 Nicolas Koenig <koeni...@student.ethz.ch>
PR fortran/69498
* gfortran.dg/submodule_unexp.f90: Modified test
to account for new error.
! { 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