Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Automatic allocation of arrays in fortran is not working

$
0
0

Hello,

    I am using ifort 15.0.1. I know that the automatic allocation works in fortran 2008. I got it working with gfortran. But it seems ifort is not able to compile such programs appropriately. Below is a simple program :

program testing
  implicit none
  real,allocatable,dimension (:):: a,b
  allocate(a(10))
  a = 1.0
  b = a
  print*,size(b)
end program

   The array "b" should get the allocation of array "a" along with its values. When I compile with gfortran, the program prints 10, but for ifort it prints 0. Is this feature of F2008 supported yet in ifort ?

Regards,

Dhiraj

 

 

 

  

 

 

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



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