This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
The trick is to use the same logic as in gfc_trans_scalar_assign, and check the ts.derived->alloc_comp field, which indicates whether the type contains any allocatable fields that require special handling. Presumably, the front-end sets this field correctly for derived types containing derived types, otherwise both the existing gfc_trans_scalar_assign and the new code below contain potential bugs. Likewise, for derived types containing character fields.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |