Commit d646bbce by Tobias Burnus Committed by Tobias Burnus

re PR fortran/44614 ([OOP] Wrongly importing a symbol into an interface without IMPORT)

2010-06-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/44614
        * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.

2010-06-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/44614
        * gfortran.dg/import8.f90: New.

From-SVN: r161310
parent 5f4a67a5
2010-06-24 Tobias Burnus <burnus@net-b.de>
PR fortran/44614
* decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2010-06-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/44616
......
......@@ -1764,7 +1764,7 @@ variable_decl (int elem)
specified in the procedure definition, except that the interface
may specify a procedure that is not pure if the procedure is
defined to be pure(12.3.2). */
if (current_ts.type == BT_DERIVED
if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
&& gfc_current_ns->proc_name
&& gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
&& current_ts.u.derived->ns != gfc_current_ns)
......
2010-06-24 Tobias Burnus <burnus@net-b.de>
PR fortran/44614
* gfortran.dg/import8.f90: New.
2010-06-23 Arnaud Charlet <charlet@adacore.com>
* gnat.dg/not_null.adb: Update test case.
......
! { dg-do compile }
!
! PR fortran/44614
!
!
implicit none
type, abstract :: Connection
end type Connection
abstract interface
subroutine generic_desc(self)
! <<< missing IMPORT
class(Connection) :: self ! { dg-error "has not been declared within the interface" }
end subroutine generic_desc
end interface
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment