diff options
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 2975975..b5a17c0 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -181,6 +181,10 @@ free_expr0 (gfc_expr *e) gfc_free_actual_arglist (e->value.function.actual); break; + case EXPR_COMPCALL: + gfc_free_actual_arglist (e->value.compcall.actual); + break; + case EXPR_VARIABLE: break; @@ -268,8 +272,8 @@ gfc_extract_int (gfc_expr *expr, int *result) /* Recursively copy a list of reference structures. */ -static gfc_ref * -copy_ref (gfc_ref *src) +gfc_ref * +gfc_copy_ref (gfc_ref *src) { gfc_array_ref *ar; gfc_ref *dest; @@ -299,7 +303,7 @@ copy_ref (gfc_ref *src) break; } - dest->next = copy_ref (src->next); + dest->next = gfc_copy_ref (src->next); return dest; } @@ -502,6 +506,12 @@ gfc_copy_expr (gfc_expr *p) gfc_copy_actual_arglist (p->value.function.actual); break; + case EXPR_COMPCALL: + q->value.compcall.actual = + gfc_copy_actual_arglist (p->value.compcall.actual); + q->value.compcall.tbp = p->value.compcall.tbp; + break; + case EXPR_STRUCTURE: case EXPR_ARRAY: q->value.constructor = gfc_copy_constructor (p->value.constructor); @@ -514,7 +524,7 @@ gfc_copy_expr (gfc_expr *p) q->shape = gfc_copy_shape (p->shape, p->rank); - q->ref = copy_ref (p->ref); + q->ref = gfc_copy_ref (p->ref); return q; } @@ -1443,7 +1453,7 @@ simplify_const_ref (gfc_expr *p) cons = p->value.constructor; for (; cons; cons = cons->next) { - cons->expr->ref = copy_ref (p->ref->next); + cons->expr->ref = gfc_copy_ref (p->ref->next); simplify_const_ref (cons->expr); } } @@ -1531,7 +1541,7 @@ simplify_parameter_variable (gfc_expr *p, int type) /* Do not copy subobject refs for constant. */ if (e->expr_type != EXPR_CONSTANT && p->ref != NULL) - e->ref = copy_ref (p->ref); + e->ref = gfc_copy_ref (p->ref); t = gfc_simplify_expr (e, type); /* Only use the simplification if it eliminated all subobject references. */ @@ -1670,6 +1680,10 @@ gfc_simplify_expr (gfc_expr *p, int type) return FAILURE; break; + + case EXPR_COMPCALL: + gcc_unreachable (); + break; } return SUCCESS; |