2015-10-06 Louis Krupp <louis.krupp@zoho.com>
PR fortran/65766
* resolve.c (gfc_resolve_substring_charlen): For derived type,
use typespec of string component when resolving substring length.
2015-10-06 Louis Krupp <louis.krupp@zoho.com>
PR fortran/65766
* gfortran.dg/substr_alloc_string_comp_1.f90: New.
From-SVN: r228551
+2015-10-06 Louis Krupp <louis.krupp@zoho.com>
+ PR fortran/65766
+ * resolve.c (gfc_resolve_substring_charlen): For derived type,
+ use typespec of string component when resolving substring length.
+
2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
* match.c (gfc_match_common): Remove dead variable old_blank_common.
{
gfc_ref *char_ref;
gfc_expr *start, *end;
+ gfc_typespec *ts = NULL;
for (char_ref = e->ref; char_ref; char_ref = char_ref->next)
- if (char_ref->type == REF_SUBSTRING)
- break;
+ {
+ if (char_ref->type == REF_SUBSTRING)
+ break;
+ if (char_ref->type == REF_COMPONENT)
+ ts = &char_ref->u.c.component->ts;
+ }
if (!char_ref)
return;
if (char_ref->u.ss.end)
end = gfc_copy_expr (char_ref->u.ss.end);
else if (e->expr_type == EXPR_VARIABLE)
- end = gfc_copy_expr (e->symtree->n.sym->ts.u.cl->length);
+ {
+ if (!ts)
+ ts = &e->symtree->n.sym->ts;
+ end = gfc_copy_expr (ts->u.cl->length);
+ }
else
end = NULL;
* gcc.target/aarch64/get_lane_f16_1.c: New test.
+2015-10-06 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/65766
+ * gfortran.dg/substr_alloc_string_comp_1.f90: New.
+
2015-10-06 Marek Polacek <polacek@redhat.com>
PR c++/67863