This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/18022] problem with structure and calling a function
- From: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2005 10:01:08 -0000
- Subject: [Bug fortran/18022] problem with structure and calling a function
- References: <20041015190149.18022.gruel@astro.ufl.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-08-03 10:01 -------
Tobi,
We should agree the condition by which the call to gfc_trans_arrayfunc_assign
is bypassed and get this one out of the way. The original, posted to the list,
had:
expr1->symtree->n.sym->ts.type == expr1->ts.type)
the version here has:
expr1->symtree->n.sym->ts.derived == expr1->ts.derived
The first allows all derived type components of derived types, which is
sometimes not correct.
The second was an attempt to permit arrays of derived types to work and arrays
of linked lists. This latter is, perhaps, more reasonably viewed as a linked
list contained in an array! I have somewhere (Meissner's book?) see an example
of such a thing. It has the advantage that memory management is simplified and
that the entire list can be treated as an entity.
Cheers
Paul T
Maybe I should hang a diagnostic on the second, to print out the expression and
symbol types, so that I can reassure myself that it is working as intended?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18022