[Bug fortran/57959] ICE with structure constructor with scalar allocatable components
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 23 09:06:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57959
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
gfc_trans_subcomponent_assign lacks handling of allocatable scalars. It simply
does:
type1.0.anum = 5.0
instead of:
(re)allocate of "type1.0.anum"
*type1.0.anum = 5.0
For arrays, it is handled via gfc_trans_alloc_subarray_assign, which is called
via gfc_trans_structure_assign -> gfc_trans_subcomponent_assign.
TODO: Also check whether coarrays are properly handled. "= TYPE(CAF=5.0)"
should be valid, but the LHS shan't be (re)allocated.
More information about the Gcc-bugs
mailing list