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

Function with entry and allocatable result gives ICE

Harald1
New Contributor II
550 Views

Hello,

the following snippet produces an ICE with ifort 2021.9 but not with ifx 2023.1:

function f3()
! real, pointer     :: f3, e3 ! no ICE
  real, allocatable :: f3, e3 ! ICE
  allocate (f3, source=1.0)
  return
entry e3()
  allocate (e3, source=2.0)
end

I get:

% ifort ifort-entry-allocable.f90 -c
ifort-entry-allocable.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.
compilation aborted for ifort-entry-allocable.f90 (code 1)

Is this a known issue that has been fixed for ifx?  If so, are there plans to backport a fix to ifort?

Thanks,

Harald

 

0 Kudos
6 Replies
Ron_Green
Moderator
513 Views

Ifort and IFX use the same language parser and interpreter.  Same code, we do not use separate branches. But there is the middle and backends that differ.

This bug is unique to Ifort.  The ENTRY is tripping it up, specifically while it's making the prolog code for the E3entry point.  I will get a bug report for this.  And I'll check with the developer who has recently been working on ENTRY handling.  Thanks for sending this to us.

 

Ron

0 Kudos
Ron_Green
Moderator
508 Views

Bug ID is CMPLRIL0-35273


0 Kudos
Ron_Green
Moderator
355 Views

This issue is fixed in the recent 2024.0 release.


0 Kudos
Harald1
New Contributor II
341 Views

Confirmed: the ICE is gone.

Thanks!

 

0 Kudos
andrew_4619
Honored Contributor II
324 Views

Do you actually use ENTRY or where you working with some ancient code? 

0 Kudos
Harald1
New Contributor II
315 Views

Sort-of the latter.  My own codes would rather try to use more modern Fortran features.

 

0 Kudos
Reply