- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe this is a Fortran Standard feature requiring an additional option to enable, either -assume realloc_lhs or -standard-semantics. The program prints 10 with either option.
Refer to Intel® Fortran Compiler - Support for Fortran language standards for additional information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Kevin. It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're welcome.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page