[Patch, fortran] PR83118 - [8/9/10/11 Regression] Bad intrinsic assignment of class(*) array component of derived type
Tobias Burnus
tobias@codesourcery.com
Wed Nov 11 11:58:37 GMT 2020
Hi Paul,
thanks for the patch.
On 10.11.20 14:25, Paul Richard Thomas via Fortran wrote:
> ...
unlimited_polymorphic_32.f03:
> if (any (z .ne. [42_4, 43_4])) stop 1 + idx
If you already use an offset for the stop codes, can you enumerate those?
Currently all are 'stop 1'.
In resolve.c: Typo 'ie.' → 'i.e.' (or, if really needed: 'ie')
> + temporary; ie. the rhs of the assignment. */
> +get_class_info_from_ss (stmtblock_t * pre, gfc_ss *ss, tree *eltype)
> ...
> + /* lhs is class and rhs is intrinsic or derived type. */
> ...
> + if (unlimited_lhs)
> + {
> + tmp = gfc_class_len_get (lhs_class_expr);
> + if (rhs_ss->info
> + && rhs_ss->info->expr
> + && rhs_ss->info->expr->ts.type == BT_CHARACTER)
> + tmp2 = build_int_cst (TREE_TYPE (tmp),
> + rhs_ss->info->expr->ts.kind);
The last part looks incomplete. Unless I am mistaken:
The length for BT_CHARACTER is the character kind times the string length,
not just the character kind.
Otherwise: LGTM, but I do not want to rule out that I missed something!
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
More information about the Fortran
mailing list