Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Parameterized Derived Type: error #6197: An assignment of different structure types is invalid

$
0
0

The code below appears ok, but compiler throws an unexpected error #6197: An assignment of different structure types is invalid:

module m

   implicit none

   type, abstract :: a(k)
      integer, kind :: k
   end type

   type, extends(a) :: e
   end type

   type :: c
      type( e(k=42) ) :: foo = e(k=42)()
   end type

end module
Compiling with Intel(R) Visual Fortran Compiler 17.0.0.109 [Intel(R) 64]...
m.f90
m.f90(13): error #6197: An assignment of different structure types is invalid.   [FOO]
ifort: error #10298: problem during post processing of parallel object compilation
compilation aborted for m.f90 (code 1)

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



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