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

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

ur
Novice
155 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))
-------------------------------------^

0 Kudos
1 Solution
Barbara_P_Intel
Moderator
131 Views

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



View solution in original post

1 Reply
Barbara_P_Intel
Moderator
132 Views

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



Reply