Fortran90: array of pointer arrays defined as pointer (bug in ifort 11.1?) -


I have a question and a problem (I think they are related).

Question: Am I defined as the array indicator indicator array in the foreter 9?

  type string character, indicator :: str (:) end type type (string), indicator :: arr (:)   

Problem: I have Code (see below) for which ifort 11.1 gives the default font in the last text. Other compiler, such as Gaferan 4.6.3, EOFT 11.1.072, 12.0.1, ..., worked without problems

Think about the simulation of the Python attachment function about code You can.

  Any type of string inherent in the program exam, indicator :: key character, indicator :: str (:) end type type (string), indicator :: arr (:), tmp ( :) allot (arr (1)) allocated (arr (1)% str (1)) arr (1)% str (1) = write 'A' (6, *) arr (1)% str (1)! -------------------- TMP = & gt; Write AR (6, *) TMP (1)% str (1)! -------------------- Empty allocation (arr (2)) arr (1)% str = & gt; The expected result is: AAA  

ifort gives the division 11.1 The mistake on the last line is now strange, if you declare an integer in the type string you get the event With the 11.1 also, the expected results will be found.

Is this a compiler problem or am I using non-standard FORTRAN 99 structures?

Compile and execute your code without the problem using Intel Fortran 13.0.something other compiler and With its experience with compiler versions, it suggests a compiler bug, though one is correct.

I'm not completely sure what Python functions, but if you have a Fortran method whose content (and length) can change dynamically, you can use the Fortran 2003 automatic allocation attributes Should seriously consider. For example, you can define the string like this:

  character (len = :), allocated :: string1   

Value:

  string1 = 'this is 1 string'   

and give it another value:

  String1 = 'this' is   

or it's like

  string1 = string1 // 'more text'   

Lack of statements allocating the size of the complete inspection string1 or allocating it again.

Comments