This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: allocate on assignment problem
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Tobias Burnus" <burnus at net-b dot de>
- Cc: mrestelli at gmail dot com, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Thu, 4 Sep 2008 18:22:15 +0200
- Subject: Re: allocate on assignment problem
- 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=lwiDXRk9+bRylz3OCZcQkFV9yZI9JxmNGPZiFlV0y48=; b=Nrve0B+mWU3Fpnqup0mcWbahGPbDcmu++TVblhiS6p4bKl1QBEo2WpxOVmq/tF92+i /q+VU3Xy+HvcOD/jskv58iW+uTI6IXteG1Z3egkPcJN3dT31mRLpySyYIqYvPQ2MOdNQ wlV6Q6m8+0Pn+9Jnve1pcF/f+C1nMa24vtOC8=
- 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=ddqIX+n9sGOi9Wv47IEjRxO//niSx8D+MTeSHzAxRjK05kmdYsAXq0n9x1MpBwUA1F u+7byE8G3ZSv3axa5sgj0d+3IXhBbJxkeN1QNfB3pdPiD8q13fePVud8uXckgzlnDSuz FIJcS0EmY9FIDNTfVSauc785nbhy0Xu/qFXZI=
- References: <bf36c5560809031543s7dc010b1jd75f6e7bf9b08cce@mail.gmail.com> <48BF8B0D.2060501@domob.eu> <bf36c5560809040054w60fe5176n957fec5c0d06c562@mail.gmail.com> <48C0047F.60708@net-b.de>
Tobias and Marco,
> Hmm, I re-read the bug report,
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35810, and seemingly there are
> additional issues: Not all reallocations seem work for derived types; those
> with constructors do work.
That's the way in which alloctable components are implemented. It
looks like derived type with alloc comps = derived type with alloc
comps.
>
> For the time being, I would (re)allocate by hand. Also other compilers such
> as ifort do not support reallocation with the default options (ifort does
> support it with -assume realloc_lhs [the reason is that this slows down all
> programs - and since only program did not use it]).
>
> As GCC/gfortran is now in stage3 (only bug fixes), I think the support will
> be deferred to GCC 4.5. The chances are very high that this feature will be
> implemented in 4.5.
We will need all the allocatable enhancements to make classes work
correctly, including allocate on assignment and scalar allocation.
So, yes, I would say that the prospects are very high that 4.5 will
see these features.
Paul
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy