Recursive function with allocatable array

michael baudin michael.baudin@gmail.com
Wed Apr 16 21:20:00 GMT 2008


Hi,
After you suggested it, I submitted the bug #35959 in bugzilla a few
minutes ago.
I had allready searched in bug database before writing to the mailing list.

This is a weird bug...
I allready worked hard to extract that small part.
At first, I thought that it had something to do with arrays of size zero, but
it fact, nothing. Allocatable arrays of zero size behave well in all
the situations
I tested (during several hours I must admit !).The bug really depends
on the 3 items :
- recursive function
- derived type
- allocatable array

I tested many versions by changing one item (and not the 2 others), and
all these versions worked.
- If you change allocatable by pointer, it works.
- If you change derived type by a simple array, it works.
- If you do not use a recursive function, but a simple loop algorithm,
it works also

Yes, indeed, very special border line case.

Regards,

Michaël



More information about the Fortran mailing list