[Bug fortran/54881] [OOP] ICE in fold_convert_loc, at fold-const.c:2016

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 10 08:28:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54881

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-10
     Ever Confirmed|0                           |1

--- Comment #3 from janus at gcc dot gnu.org 2012-10-10 08:28:29 UTC ---
(In reply to comment #1)
> 
>       call DestroyNode (theNode, lstatus )
>                         1
> Error: Actual argument for 'thenode' must be a pointer at (1)
> 
> which seems weird (AFAICT theNode is a pointer).

I agree that this error looks fishy. 'theNode' is clearly declared as POINTER,
and the error only occurs if the call is inside a SELECT TYPE statement. Here
is a reduced test case:


  implicit none

  type treeNode
  end type

  class(treeNode), pointer :: theNode
  logical :: lstatus

  select type( theNode )
  class is (treeNode)
    call DestroyNode (theNode, lstatus )
  end select

contains

  subroutine DestroyNode( theNode, lstatus )
    class(treeNode), pointer :: theNode
    logical, intent(out) :: lstatus
  end subroutine

end


Seems to be a regression on trunk.



More information about the Gcc-bugs mailing list