Bug 51394

Summary: Rejects legal code involving an allocatable string
Product: gcc Reporter: Ian Thompson <ian.thompson>
Component: fortranAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: burnus
Priority: P3 Keywords: ice-on-valid-code
Version: 4.7.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on: 45170    
Bug Blocks:    
Attachments: Terminal i/o

Description Ian Thompson 2011-12-03 13:09:34 UTC
Created attachment 25980 [details]
Terminal i/o

!This code generates an internal compiler error.

module tokens

implicit none

type :: token
  character (:) , allocatable :: string
end type


  subroutine write_token( tok )

    implicit none

    type (token) , intent (in) :: tok

  end subroutine

end module
Comment 1 Tobias Burnus 2011-12-03 17:06:53 UTC
I think this bug is effectively a duplicate of PR 51075.

Deferred-length characters are unfortunately not yet supported as components in derived types.
Comment 2 Tobias Burnus 2012-05-14 16:43:52 UTC
(In reply to comment #0)
> !This code generates an internal compiler error.

That has been meanwhile fixed by printing a not-yet-implemented error when allocatable string in components of derived types are used.

The implementation is tracked in PR 51976

*** This bug has been marked as a duplicate of bug 51976 ***