User account creation filtered due to spam.

Bug 51394 - Rejects legal code involving an allocatable string
Summary: Rejects legal code involving an allocatable string
Status: RESOLVED DUPLICATE of bug 51976
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on: 45170
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-03 13:09 UTC by Ian Thompson
Modified: 2012-05-14 16:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Terminal i/o (820 bytes, text/plain)
2011-12-03 13:09 UTC, Ian Thompson
Details

Note You need to log in before you can comment on or make changes to this bug.
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

contains

  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 ***