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

Getting an ICE with ifx 2023 when passing substrings as arguments that will get a returned value

ur
New Contributor II
511 Views

This reduced example generates an ICE using ifx(1) when a substring is
passed as an argument that is returned. Works fine with several other
compilers.

program substring_bug
implicit none

type argstr
character(len=:), allocatable :: string
end type argstr

type(argstr) :: args

args%string=repeat('=',80)
call get_command_argument(0,args%string(15:65))
write(*,'(g0)')args%string

end program substring_bug

+ fpm run --compiler gfortran
==============build/gfortran_2A42023B310FA28D/app/ICE ===============
+ fpm run --compiler ifort
==============build/ifort_5C58216731706F11/app/ICE ===============
+ fpm run --compiler ifx

/opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/xfortcom[0x1f563ca]
/opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/xfortcom[0x1bef70e]
:
:
:
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x147bf6768083]
/opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/xfortcom[0x1982da9]

app/main.f90(11): 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.
call get_command_argument(0,args%string(15:65))
-------------------------------------^

1 Solution
Barbara_P_Intel
Moderator
487 Views

@ur, thanks for putting ifx through its paces! I filed a bug report, CMPLRLLVM-42933.



View solution in original post

0 Kudos
3 Replies
Barbara_P_Intel
Moderator
488 Views

@ur, thanks for putting ifx through its paces! I filed a bug report, CMPLRLLVM-42933.



0 Kudos
Barbara_P_Intel
Moderator
322 Views

This ICE is fixed in the Fortran compiler that was released this week as part of oneAPI HPC Toolkit 2023.1.

Please check it out!


ur
New Contributor II
319 Views

Works with the new ifort and ifx. Thanks!

0 Kudos
Reply