Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Important Update: Community Platform Migration​. Learn more​>

segfault in tokenize

Diehl__Martin
Novice
449 Views
! Minimal reproducer for the ifx 2026.1 TOKENIZE intrinsic
program repro_tokenize_ifx
  implicit none
  character(len=:), dimension(:), allocatable :: t

  print*, 'version',__INTEL_COMPILER_BUILD_DATE
  call flush(6)
  call tokenize("aaa bbb ccc", " ", t)
  print*, size(t), len(t(1)), trim(t(2))

end program repro_tokenize_ifx

leads to

 version    20260617
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable T when it is not allocated

Image              PC                Routine            Line        Source             
repro_tokenize_if  0000000000405362  Unknown               Unknown  Unknown
repro_tokenize_if  000000000040527D  Unknown               Unknown  Unknown
libc.so.6          000006CF4402A1CA  Unknown               Unknown  Unknown
libc.so.6          000006CF4402A28B  __libc_start_main     Unknown  Unknown
repro_tokenize_if  0000000000405165  Unknown               Unknown  Unknown

when compiled with

ifx -fpp -check pointers repro_tokenize_ifx.f90

 

3 Replies
Diehl__Martin
Novice
448 Views

here is the file

0 Kudos
Arjen_Markus
Honored Contributor II
403 Views

FWIW the segfault does not occur with ifx 2025.3.2.

0 Kudos
MarcGrodent
New Contributor III
395 Views

I can reproduce this error with ifx 2026.1.1.

It occurs due to the compiler option (on Windows):

/check:pointers

Without this flag the code runs correctly.

So yes probably a compiler bug here.


0 Kudos
Reply