Showing results for 
Search instead for 
Did you mean: 
1 View

-check all triggers an internal compiler error

When compiled with -check all with ifort the following code produces and internal compiler error:

module m
 implicit none


 function ftext(text) result(s)
  character(len=*), intent(in) :: text(:)
  integer :: l
  character(len = 6+sum((/(len_trim(text(l)),l=1,size(text))/))) :: s
  character(len=*), parameter :: format = '(a,*(a))'

   write(s,format) &
       'Text: ', ( trim(text(l)) ,l=1,size(text))

 end function ftext

 subroutine s()
  integer :: i
  character(len=1000) :: str
  str = ftext((/"abc"/) )
 end subroutine s

end module m


0 Kudos
2 Replies
1 View

Thank you for the report and

Thank you for the report and convenient reproducer. I can reproduce this with ifort 16.0 but not our newer ifort 17.0 (Beta) so we may already have a known fix coming. I'll investigate a bit further and reply with more details later.

0 Kudos
1 View

Development was also unable

Development was also unable to determine the exact edit responsible for fixing this in 17.0; however, we confirmed it remains fixed in 17.0 source branch and our current development sources, and we added the test case to our internal test suite to ensure it does not regress in the future.

0 Kudos