[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439 janus at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.6.0
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
--- Comment #4 from janus at gcc dot gnu dot org 2010-08-29 09:56 --- Subject: Bug 45439 Author: janus Date: Sun Aug 29 09:56:45 2010 New Revision: 163626 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163626 Log: 2010-08-29 Janus Weil ja...@gcc.gnu.org PR fortran/45439 * match.c (gfc_match_select_type): Give the associate-name the FL_VARIABLE attribute. 2010-08-29 Janus Weil ja...@gcc.gnu.org PR fortran/45439 * gfortran.dg/select_type_16.f03: New. Added: trunk/gcc/testsuite/gfortran.dg/select_type_16.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
--- Comment #5 from janus at gcc dot gnu dot org 2010-08-29 09:57 --- Fixed with r163626. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
--- Comment #1 from sfilippone at uniroma2 dot it 2010-08-28 11:15 --- Created an attachment (id=21583) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21583action=view) test case The code compiles cleanly with XLF. If I switch the commented lines in the CLASS DEFAULT clause, it compiles cleanly (but I am not sure about the runtime behaviour, as I have seen other problems down the road in the original application). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
-- janus at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||rejects-valid Last reconfirmed|-00-00 00:00:00 |2010-08-28 11:27:22 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
--- Comment #2 from janus at gcc dot gnu dot org 2010-08-28 12:18 --- Reduced test case: module d_base_mat_mod implicit none type :: d_base_sparse_mat contains procedure, pass(a) :: mv_to_coo = d_base_mv_to_coo end type d_base_sparse_mat interface subroutine d_base_mv_to_coo(a) import d_base_sparse_mat class(d_base_sparse_mat), intent(inout) :: a end subroutine d_base_mv_to_coo end interface type :: d_sparse_mat class(d_base_sparse_mat), allocatable :: a end type d_sparse_mat contains subroutine bug21(ax) type(d_sparse_mat), intent(inout) :: ax select type(aa= ax%a) class default call aa%mv_to_coo() end select end subroutine bug21 end module d_base_mat_mod -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439
[Bug fortran/45439] [OOP] SELECT TYPE bogus complaint about INTENT
--- Comment #3 from janus at gcc dot gnu dot org 2010-08-28 12:49 --- Here's the fix: Index: match.c === --- match.c (revision 163612) +++ match.c (working copy) @@ -4532,6 +4532,7 @@ gfc_match_select_type (void) expr1-symtree-n.sym-attr.untyped = 1; else expr1-symtree-n.sym-ts = expr2-ts; + expr1-symtree-n.sym-attr.flavor = FL_VARIABLE; expr1-symtree-n.sym-attr.referenced = 1; expr1-symtree-n.sym-attr.class_ok = 1; } I'll commit as obvious after a regtest. -- janus at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-08-28 11:27:22 |2010-08-28 12:49:33 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45439