[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-31 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #10 from janus at gcc dot gnu.org ---
Author: janus
Date: Tue Dec 31 14:02:04 2013
New Revision: 206266

URL: http://gcc.gnu.org/viewcvs?rev=206266root=gccview=rev
Log:
2013-12-31  Janus Weil  ja...@gcc.gnu.org

Backport from mainline
2013-12-30  Janus Weil  ja...@gcc.gnu.org

PR fortran/58998
* resolve.c (resolve_symbol): Check that symbol is not only flavorless
but also untyped.

2013-12-31  Janus Weil  ja...@gcc.gnu.org

Backport from mainline
2013-12-30  Janus Weil  ja...@gcc.gnu.org

PR fortran/58998
* gfortran.dg/generic_28.f90: New.

Added:
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/generic_28.f90
Modified:
branches/gcc-4_8-branch/gcc/fortran/ChangeLog
branches/gcc-4_8-branch/gcc/fortran/resolve.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-31 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from janus at gcc dot gnu.org ---
Fixed for 4.9.0 and 4.8.3. Closing.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-30 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #9 from janus at gcc dot gnu.org ---
Author: janus
Date: Mon Dec 30 17:33:21 2013
New Revision: 206249

URL: http://gcc.gnu.org/viewcvs?rev=206249root=gccview=rev
Log:
2013-12-30  Janus Weil  ja...@gcc.gnu.org

PR fortran/58998
* resolve.c (resolve_symbol): Check that symbol is not only flavorless
but also untyped.

2013-12-30  Janus Weil  ja...@gcc.gnu.org

PR fortran/58998
* gfortran.dg/generic_28.f90: New.

Added:
trunk/gcc/testsuite/gfortran.dg/generic_28.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-12-29
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr ---
The changed appeared between r185913 (2012-03-28, no error) and r186417
(2012-04-13, error).


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #3 from janus at gcc dot gnu.org ---
According to the c.l.f. discussion, the 'iargc' reference inside the function
'iargc_8' does not refer to the generic interface, but to an external function.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #2)
 The changed appeared between r185913 (2012-03-28, no error) and r186417
 (2012-04-13, error).

The most suspicious commit I can see in that range is r186318, which was
Tobias' fix for PR52729.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4)
 The most suspicious commit I can see in that range is r186318, which was
 Tobias' fix for PR52729.

Indeed reverting this commit makes the error go away for comment 0 and 1.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #6 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #2)
 The changed appeared between r185913 (2012-03-28, no error) and r186417
 (2012-04-13, error).

Thanks for narrowing it down so sharply, Dominique. That was very helpful.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org

--- Comment #7 from janus at gcc dot gnu.org ---
I propose the following patch:

Index: gcc/fortran/resolve.c
===
--- gcc/fortran/resolve.c(revision 206231)
+++ gcc/fortran/resolve.c(working copy)
@@ -12732,7 +12732,8 @@ resolve_symbol (gfc_symbol *sym)
   if (sym-attr.flavor == FL_UNKNOWN
   || (sym-attr.flavor == FL_PROCEDURE  !sym-attr.intrinsic
!sym-attr.generic  !sym-attr.external
-   sym-attr.if_source == IFSRC_UNKNOWN))
+   sym-attr.if_source == IFSRC_UNKNOWN
+   sym-ts.type == BT_UNKNOWN))
 {

 /* If we find that a flavorless symbol is an interface in one of the


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-12-29 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

--- Comment #8 from janus at gcc dot gnu.org ---
(In reply to janus from comment #7)
 I propose the following patch:

... which regtests cleanly.


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-11-08 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

janus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org ---
Reduced test case:


module args_mod

  interface iargc
module procedure iargc_8
  end interface

contains

  integer(8) function iargc_8()
integer(4) iargc
iargc_8=iargc()
  end function

end module


(The getarg parts are not relevant for the bug.)


[Bug fortran/58998] [4.8/4.9 Regression] Generic interface problem with gfortran

2013-11-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58998

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |4.8.3