View previous topic :: View next topic |
Author |
Message |
simon
Joined: 05 Jul 2006 Posts: 299
|
Posted: Mon Sep 26, 2011 7:08 pm Post subject: Allocating an array incorrectly |
|
|
The following program assigns an array, but with too few dimensions. The program prints a 1 and then some nonsense number depending upon the compiler options. (If the array is declared in a module and compiled using only /LGO, the program will print two 1s.) It would be helpful if the compiler could pick this up as a programming error, which I assume it is.
Code: | PROGRAM p
INTEGER, ALLOCATABLE :: i(:,:)
ALLOCATE (i(1))
PRINT*, SHAPE(i)
END PROGRAM p |
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Sep 27, 2011 7:08 am Post subject: |
|
|
I have logged this for investigation. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Feb 23, 2012 3:27 pm Post subject: |
|
|
I have fixed this omission for the next release of FTN95. |
|
Back to top |
|
 |
|