Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Bogus error: error #7367: The data value NULL() can only be assigned to a Fortran POINTER.

Sagan__David
Beginner
528 Views

The following code compiles with gfortran but not ifort V15:

module cu

type db_node_struct

  real, pointer :: ptr(:) => null()

end type

 

type db_struct

  type (db_node_struct) :: node(15) = db_node_struct() 

end type

 

type aaa

  type (db_struct) :: db = db_struct()

end type

 

end module

 

The generated error is:

erpsim1:~/linux_lib/test> ifort -c cu.f90

cu.f90(12): error #7367: The data value NULL() can only be assigned to a Fortran POINTER.

  type (db_struct) :: db = db_struct()

^

compilation aborted for cu.f90 (code 1)

0 Kudos
1 Reply
Kevin_D_Intel
Employee
528 Views

Thank you for the report. I directed this to the Fortran Development team.

(Internal tracking id: DPD200377419)

0 Kudos
Reply