From: Janus Weil Date: Mon, 30 Dec 2013 17:33:21 +0000 (+0100) Subject: re PR fortran/58998 (Generic interface problem with gfortran) X-Git-Tag: upstream/12.2.0~65708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bd5968441b9cc3b46ee266c03062ac4d7b7e154;p=platform%2Fupstream%2Fgcc.git re PR fortran/58998 (Generic interface problem with gfortran) 2013-12-30 Janus Weil PR fortran/58998 * resolve.c (resolve_symbol): Check that symbol is not only flavorless but also untyped. 2013-12-30 Janus Weil PR fortran/58998 * gfortran.dg/generic_28.f90: New. From-SVN: r206249 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 60922b8..6c7cea7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2013-12-30 Janus Weil + + PR fortran/58998 + * resolve.c (resolve_symbol): Check that symbol is not only flavorless + but also untyped. + 2013-12-29 Janus Weil PR fortran/59612 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 57e6cbb..54cfdd6 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d68675..8f94e49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-12-30 Janus Weil + + PR fortran/58998 + * gfortran.dg/generic_28.f90: New. + 2013-12-30 Jakub Jelinek PR tree-optimization/59591 diff --git a/gcc/testsuite/gfortran.dg/generic_28.f90 b/gcc/testsuite/gfortran.dg/generic_28.f90 new file mode 100644 index 0000000..5ddc979 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/generic_28.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! +! PR 58998: [4.8/4.9 Regression] Generic interface problem with gfortran +! +! Contributed by Paul van Delst + + interface iargc + procedure iargc_8 + end interface + +contains + + integer(8) function iargc_8() + integer(4) iargc + iargc_8 = iargc() + end function + +end