diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2005-06-12 23:18:15 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-06-12 23:18:15 -0700 |
commit | 4c73896d18e03c31a811c941082a6ed94605a905 (patch) | |
tree | 33ec9baebc91f457ac91d8a14ac4a7044925dbfe /gcc/fortran/trans-expr.c | |
parent | 9204496d6524abc0c2e55152ebc2ad6698006301 (diff) | |
download | gcc-4c73896d18e03c31a811c941082a6ed94605a905.zip gcc-4c73896d18e03c31a811c941082a6ed94605a905.tar.gz gcc-4c73896d18e03c31a811c941082a6ed94605a905.tar.bz2 |
trans-array.c (gfc_conv_descriptor_data_get): Rename from gfc_conv_descriptor_data.
* trans-array.c (gfc_conv_descriptor_data_get): Rename from
gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
(gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
(gfc_trans_allocate_array_storage): Use them.
(gfc_array_allocate, gfc_array_deallocate): Likewise.
(gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
(gfc_trans_deferred_array): Likewise.
* trans-expr.c (gfc_conv_function_call): Likewise.
(gfc_trans_subcomponent_assign): Likewise.
(gfc_trans_pointer_assignment): Likewise.
* trans-intrinsic.c (gfc_conv_allocated): Likewise.
* trans-types.c (gfc_array_descriptor_base): New.
(gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
(gfc_get_array_descriptor_base): Break out from ...
(gfc_get_array_type_bounds): ... here. Create type variants.
* trans-array.h (gfc_conv_descriptor_data_get): Declare.
(gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
From-SVN: r100872
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index ee6de7e..4395534 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1353,7 +1353,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, { /* Check the data pointer hasn't been modified. This would happen in a function returning a pointer. */ - tmp = gfc_conv_descriptor_data (info->descriptor); + tmp = gfc_conv_descriptor_data_get (info->descriptor); tmp = build2 (NE_EXPR, boolean_type_node, tmp, info->data); gfc_trans_runtime_check (tmp, gfc_strconst_fault, &se->pre); } @@ -1714,12 +1714,7 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr) { /* Array pointer. */ if (expr->expr_type == EXPR_NULL) - { - dest = gfc_conv_descriptor_data (dest); - tmp = fold_convert (TREE_TYPE (se.expr), - null_pointer_node); - gfc_add_modify_expr (&block, dest, tmp); - } + gfc_conv_descriptor_data_set (&block, dest, null_pointer_node); else { rss = gfc_walk_expr (expr); @@ -2065,11 +2060,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) gfc_conv_expr_descriptor (&lse, expr1, lss); /* Implement Nullify. */ if (expr2->expr_type == EXPR_NULL) - { - lse.expr = gfc_conv_descriptor_data (lse.expr); - rse.expr = fold_convert (TREE_TYPE (lse.expr), null_pointer_node); - gfc_add_modify_expr (&block, lse.expr, rse.expr); - } + gfc_conv_descriptor_data_set (&block, lse.expr, null_pointer_node); else { lse.direct_byref = 1; |