aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index a92e06a..d3e7e84 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1499,7 +1499,7 @@ gfc_set_constant_character_len (int len, gfc_expr *expr, int check_len)
if (expr->ts.type != BT_CHARACTER)
return;
-
+
if (expr->expr_type != EXPR_CONSTANT)
{
gfc_error_now ("CHARACTER length must be a constant at %L", &expr->where);
@@ -6756,7 +6756,7 @@ gfc_match_end (gfc_statement *st)
match m;
gfc_namespace *parent_ns, *ns, *prev_ns;
gfc_namespace **nsp;
- bool abreviated_modproc_decl;
+ bool abreviated_modproc_decl = false;
bool got_matching_end = false;
old_loc = gfc_current_locus;
@@ -6780,15 +6780,17 @@ gfc_match_end (gfc_statement *st)
state = gfc_state_stack->previous->state;
block_name = gfc_state_stack->previous->sym == NULL
? NULL : gfc_state_stack->previous->sym->name;
+ abreviated_modproc_decl = gfc_state_stack->previous->sym
+ && gfc_state_stack->previous->sym->abr_modproc_decl;
break;
default:
break;
}
- abreviated_modproc_decl
- = gfc_current_block ()
- && gfc_current_block ()->abr_modproc_decl;
+ if (!abreviated_modproc_decl)
+ abreviated_modproc_decl = gfc_current_block ()
+ && gfc_current_block ()->abr_modproc_decl;
switch (state)
{