This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Recursive function with allocatable array
- From: "michael baudin" <michael dot baudin at gmail dot com>
- To: FX <fxcoudert at gmail dot com>, "Tobias Burnus" <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 16 Apr 2008 22:13:12 +0200
- Subject: Re: Recursive function with allocatable array
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=+EEcSG5viJbdg3ghQVsinBAAINWqehMI41aelkBfpAk=; b=QjDeLOsw8McoZoMA8ZScHVK9PmQcy3A9IZ3J1hJygHlWM9+A3nGJ4z4TGvLvV+sHth8gC4y5wa+EhHV/rlsNe+5dAuRiRC9eQFK5sKDKrlTUeHXy4DdJa2Ed1vHyUGlUhDNXf4bz4ULytqEXaBS7WVYk1PGvZSsIOuwbY38u2IY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=poul1snTGeOqWEkFlMICPMqUTCvlbvC7FULv1u6ETKbS9YqnzQRo3uiMTh7+Qwi/Oniemc72JyHzrG09QKQ2JOX7nsf2kdxT2Mh2aAiBDxlr7V8M8z7dBcY8hHoYZ8l/rJXwPPrugZy/MdPmgmXtE+tp0D0d3U3RazbdUgSINkQ=
- References: <da56dfcb0804160820l5224502dm71e0453ddda1c018@mail.gmail.com> <19c433eb0804160837k42d9cef1p467c67c1a9a07af7@mail.gmail.com>
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