This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR69498 ICE on unexpected Submodule
- From: Nicolas Koenig <koenigni at student dot ethz dot ch>
- To: GCC-Fortran-ML <fortran at gcc dot gnu dot org>, GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 10 Apr 2017 20:00:04 +0200
- Subject: Re: [Patch, fortran] PR69498 ICE on unexpected Submodule
- Authentication-results: sourceware.org; auth=none
- References: <cd6e76e2-bf3a-35e3-3bc7-b6c4b60bd04c@student.ethz.ch>
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 <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
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 <koenigni@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 <koenigni@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