- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following triggers an ICE with ifort 12:
[fortran]subroutine test1 character(len=:), allocatable :: string character(len=20) :: word ! word = 'hello' allocate(character(len=len_trim(word)) :: string) print *, 'allocated string with length ', len(string) end subroutine test1[/fortran]
But the following compiles just fine:
[fortran]subroutine test2 character(len=:), allocatable :: string character(len=20) :: word integer :: ilen ! word = 'hello' ilen = len_trim(word) allocate(character(len=ilen) :: string) print *, 'allocated string with length ', len(string) end subroutine test2[/fortran]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that is indeed a bug. I'll get a bug report started.
thanks for sending this in.
Bug ID DPD200164879
ron
thanks for sending this in.
Bug ID DPD200164879
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this bug has been fixed in 12.1 Update 6.
ron
ron

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page