[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #4 from Dominique d'Humieres  ---
> In fact, gfortran is not issues an error for data-stmt, format-stmt,
> or stmt-function-stmt.

Confirmed: the following test compiles

module m
   interface
  subroutine s
  entry e
integer :: x
data x /1/
f(x) = x*x
10  format (a)
  end
   end interface
contains
   subroutine g
   end
end

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #3 from Steve Kargl  ---
On Fri, Nov 13, 2015 at 12:42:16AM +, kargl at gcc dot gnu.org wrote:
> --- Comment #2 from kargl at gcc dot gnu.org ---
> It seems that gfortran is missing a check for ENTRY.  F2008 has
> 
> C1206 (R1205) An interface-body shall not contain a data-stmt, format-stmt,
> entry-stmt, or stmt-function-stmt.
> 

In fact, gfortran is not issues an error for data-stmt, format-stmt,
or stmt-function-stmt.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #7 from Steve Kargl  ---
On Fri, Nov 13, 2015 at 04:08:05PM +, sgk at troutmask dot
apl.washington.edu wrote:
> --- Comment #6 from Steve Kargl  ---
> On Fri, Nov 13, 2015 at 12:42:16AM +, kargl at gcc dot gnu.org wrote:
> >
> > It seems that gfortran is missing a check for ENTRY.  F2008 has
> > 
> > C1206 (R1205) An interface-body shall not contain a data-stmt, format-stmt,
> > entry-stmt, or stmt-function-stmt.
> > 
> 
> I have a patch for stmt-function-stmt and entry.
> data-stmt and format-stmt will follow shortly.
> 

I now have data-stmt and format-stmt covered.  Patch to be submitted
later today.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org

--- Comment #5 from kargl at gcc dot gnu.org ---
Working on this.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #6 from Steve Kargl  ---
On Fri, Nov 13, 2015 at 12:42:16AM +, kargl at gcc dot gnu.org wrote:
>
> It seems that gfortran is missing a check for ENTRY.  F2008 has
> 
> C1206 (R1205) An interface-body shall not contain a data-stmt, format-stmt,
> entry-stmt, or stmt-function-stmt.
> 

I have a patch for stmt-function-stmt and entry.
data-stmt and format-stmt will follow shortly.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #9 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Nov 13 21:28:10 2015
New Revision: 230352

URL: https://gcc.gnu.org/viewcvs?rev=230352=gcc=rev
Log:
2015-11-13  Steven G. Kargl  

PR fortran/68319
* decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
* io.c (gfc_match_format): Ditto.
* match.c (gfc_match_st_function): Ditto.

2015-11-13  Steven G. Kargl  

PR fortran/68319
* gfortran.dg/pr68319.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr68319.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/fortran/io.c
branches/gcc-5-branch/gcc/fortran/match.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.3

--- Comment #10 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch.  Thanks for the bug report.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-13 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Nov 13 21:11:42 2015
New Revision: 230351

URL: https://gcc.gnu.org/viewcvs?rev=230351=gcc=rev
Log:
2015-11-13  Steven G. Kargl  

PR fortran/68319
* decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
* io.c (gfc_match_format): Ditto.
* match.c (gfc_match_st_function): Ditto.

2015-11-13  Steven G. Kargl  

PR fortran/68319
* gfortran.dg/pr68319.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr68319.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/io.c
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/68319] ICE on using interface with included entry

2015-11-12 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-11-13
 CC||kargl at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from kargl at gcc dot gnu.org ---
It seems that gfortran is missing a check for ENTRY.  F2008 has

C1206 (R1205) An interface-body shall not contain a data-stmt, format-stmt,
entry-stmt, or stmt-function-stmt.

[Bug fortran/68319] ICE on using interface with included entry

2015-11-12 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68319

--- Comment #1 from Gerhard Steinmetz  
---
Same issue with interface of a function.


Compiles if interface is effectivly not used :

$ cat z1x.f90
module m
   interface
  subroutine s
  entry e
  end
   end interface
contains
   subroutine g
   end
end

$ gfortran -g -O0 -Wall -fcheck=all -c z1x.f90