This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR69498 ICE on unexpected Submodule


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]