[Patch, fortran] PR31213 , PR33888 and PR33998 - formal actual mapping problems

Tobias Burnus burnus@net-b.de
Fri Dec 14 08:56:00 GMT 2007


Paul Richard Thomas wrote:
> This departure from the original testcase came about because I made
> mapping_2.f90 much more complicated at one stage, to test the patch.
>   
Actually, the test case fails here with all my compilers. A simplified
test case:

      subroutine my_string(x)
         integer i
         real, intent(in) :: x(:)
         character(0) h4(1:minval([(1,i=1,0)],1))
         print *, size(h4)

prints:  2147483647
(h4 has the bounds:  (1:2147483647).)
Multiplied by byte that's 2.1 Terabytes!

  minval(array)
Return Value: "If ARRAY has size zero and type integer or real, the
result has the value of the positive number of the largest magnitude
supported by the processor for numbers of the type and kind type
parameter of ARRAY."

Thus gfortran behaves correctly, only the test case needs a computer
with lots of RAM ;-)

Tobias



More information about the Fortran mailing list