}
-bool
-gfc_resolve_substring (gfc_ref *ref, bool *equal_length)
+static bool
+resolve_substring (gfc_ref *ref, bool *equal_length)
{
int k = gfc_validate_kind (BT_INTEGER, gfc_charlen_int_kind, false);
case REF_SUBSTRING:
equal_length = false;
- if (!gfc_resolve_substring (*prev, &equal_length))
+ if (!resolve_substring (*prev, &equal_length))
return false;
if (expr->expr_type != EXPR_SUBSTRING && equal_length)
if (e->symtree == NULL)
return false;
sym = e->symtree->n.sym;
- if (sym == NULL)
- return false;
-// if (e->ts.type == BT_UNKNOWN)
-// return false;
/* Use same check as for TYPE(*) below; this check has to be before TYPE(*)
as ts.type is set to BT_ASSUMED in resolve_symbol. */
gfc_symtree *st = NULL;
gfc_symbol *s = NULL;
- if (e->symtree->n.sym->ns
- && e->symtree->n.sym->ns->proc_name
+ if (e->symtree->n.sym->ns->proc_name
&& e->symtree->n.sym->ns->proc_name->formal)
s = e->symtree->n.sym->ns->proc_name->formal->sym;
first_actual_arg = false;
}
else if (e->symtree != NULL
- && e->symtree->name && *e->symtree->name == '@'
- && e->symtree->n.sym && e->symtree->n.sym->attr.dummy)
+ && *e->symtree->name == '@'
+ && e->symtree->n.sym->attr.dummy)
{
/* Deal with submodule specification expressions that are not
found to be referenced in module.c(read_cleanup). */
/* For some reason, resolving these expressions a second time mangles
the typespec of the expression itself. */
if (t && e->expr_type == EXPR_VARIABLE
- && e->symtree && e->symtree->n.sym
&& e->symtree->n.sym->attr.select_rank_temporary
&& UNLIMITED_POLY (e->symtree->n.sym))
e->do_not_resolve_again = 1;
saved_specification_expr = specification_expr;
specification_expr = true;
- /* if (cl->length == NULL) */
- /* { */
- /* specification_expr = saved_specification_expr; */
- /* return true; // return false; */
- /* } */
-
- if (cl->length_from_typespec && cl->length)
+ if (cl->length_from_typespec)
{
if (!gfc_resolve_expr (cl->length))
{
&& sym != c->ts.u.derived)
add_dt_to_dt_list (c->ts.u.derived);
- if (c->as && c->as->type != AS_DEFERRED
- && (c->attr.pointer || c->attr.allocatable))
- return false;
-
if (!gfc_resolve_array_spec (c->as,
!(c->attr.pointer || c->attr.proc_pointer
|| c->attr.allocatable)))
+++ /dev/null
-! { dg-do compile }
-! PR fortran/98661 - valgrind issues with error recovery
-!
-! Test issues related to former testcase charlen_03.f90
-program p
- implicit none
- type t
- character(:), pointer :: c(n) ! { dg-error "must have a deferred shape" }
- real, allocatable :: x(n) ! { dg-error "must have a deferred shape" }
- end type
-end
-
-subroutine s
-! no 'implicit none'
- type u
- character(:), pointer :: c(n) ! { dg-error "must have a deferred shape" }
- real, allocatable :: x(n) ! { dg-error "must have a deferred shape" }
- end type
-end