For example,
- Code: Select all
real(kind=8),allocatable::a(:)
And then the sizes of the arrays are read from the standard input. This works for both small and large arrays, e.g. a(5) and a(5000).
However, if the size of the arrays are specified explicitly. For example,
- Code: Select all
real(kind=8)::a(5000)
Then the compiled executable will produce a segmentation fault.
But for small arrays, for example,
- Code: Select all
real(kind=8)::a(5)
It works fine.
So, I'm just confused about this weird phenomenon. Can anyone have a suggestion? Thank you in advance!
