Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27159 Discussions

ifx issue with function pointer result as lvalue (not yet supported)

Harald1
Novice
255 Views

While ifort 21.3 accepts the following code, ifx-21.3 crashes:

program p
  implicit none
  integer, target  :: ptr
  integer, pointer :: A
  ptr = 42
  print *, f()
  allocate (A, stat=f())
  print *, f()
contains
  function f()
    integer, pointer :: f
    f => ptr
  end function f
end

 ifort 21.3 prints the expected:

          42
           0

 ifx-21.3 crashes with a traceback and finally:

ifx-bug-lvalue.f90(7): error #5533: Feature found on this line is not yet supported in ifx 
  allocate (A, stat=f())
--^
compilation aborted for ifx-bug-lvalue.f90 (code 3)

 

Thanks,

Harald

 

0 Kudos
1 Reply
FortranFan
Honored Contributor II
243 Views

Interested readers can see this page:

https://software.intel.com/content/www/us/en/develop/articles/fortran-language-and-openmp-features-i...

The code in the original post makes use of a Fortran 2008 feature generally referred to "Pointer function reference is a variable" that is not supported yet by IFX. 

ifx.png

Intel Fortran team might find the code in the original post useful as a test case for IFX.

Reply