Quantcast
Channel: Fortran
Viewing all articles
Browse latest Browse all 3108

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

$
0
0

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)


Viewing all articles
Browse latest Browse all 3108

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>