Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28323 Discussions

ICE on string substring reference, crashes IFX but not IFORT

ur
New Contributor II
385 Views
module m_getopt_long
implicit none

type pstring
  character(len=:), pointer :: str 
end type pstring

character(len=10), target :: initial_string='1234567890'

contains

character(len=1) function getopt(self) result(retval)
type(pstring), pointer :: self
     self%str => initial_string
     self%str=>self%str(2:)
     retval=self%str(1:1)
end function getopt

end module m_getopt_long

! xx.f90(14): error #5623: **Internal compiler error: internal abort**
!             Please report this error along with the circumstances in
!             which it occurred in a Software Problem Report.  Note:
!             File and line given may not be explicit cause of this error.
! 
!      self%str=>self%str(2:)
! -----^
! compilation aborted for xx.f90 (code 3)
0 Kudos
1 Solution
Ron_Green
Moderator
340 Views

For the first ICE - I see that ICE in the 2023.0 compiler and the (hopefully) soon to be announced 2023.1 compiler. However, the nightly build does NOT ICE.  This is the version you will see in 2023.2, which should release in the late summer.

 

For the second ICE - this one is different. And it is getting the ICE in all 3 compilers I tried:  2023.0, 2023.1, and the nightly build.  I think this one is BIND(C) related, not strings related.  I'll open a bug report on this second testcase.

View solution in original post

0 Kudos
4 Replies
ur
New Contributor II
375 Views

This gets an ICE too;  compiles with ifort -c

 

 

module m_xterm
   use, intrinsic :: iso_c_binding, only: c_int, c_char
   implicit none
   interface
      function system_timeout_getkey(delay) bind(c, name='Ftimeout_getkey')
         use iso_c_binding
         implicit none
         integer(kind=c_int), intent(in), value :: delay
         character(kind=c_char) :: system_timeout_getkey
      end function system_timeout_getkey
   end interface
contains

   function rawget() result(readback)
      character(len=:), allocatable    :: readback
      readback = system_timeout_getkey(1_c_int)
   end function rawget
end module m_xterm

 

0 Kudos
Ron_Green
Moderator
341 Views

For the first ICE - I see that ICE in the 2023.0 compiler and the (hopefully) soon to be announced 2023.1 compiler. However, the nightly build does NOT ICE.  This is the version you will see in 2023.2, which should release in the late summer.

 

For the second ICE - this one is different. And it is getting the ICE in all 3 compilers I tried:  2023.0, 2023.1, and the nightly build.  I think this one is BIND(C) related, not strings related.  I'll open a bug report on this second testcase.

0 Kudos
ur
New Contributor II
320 Views

When I did a recent "apt upgrade" it appears to have installed 2023.1.0.  The results have been substantially better but there are at least several more to go. They take a while to reduce down to something small enough to post.

 

ifx --version
ifx (IFX) 2023.1.0 20230320
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 

 

Thanks for giving these your attention. 

 

PS:

That upgrade chewed though a lot of filespace, by the way. Even after cleanup it took around 8GB. That is a heck of a lot for an upgrade.

 

0 Kudos
Ron_Green
Moderator
89 Views

this issue was fixed in the 2023.2 release.


0 Kudos
Reply