aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2008-11-01 14:26:19 +0100
committerDaniel Kraft <domob@gcc.gnu.org>2008-11-01 14:26:19 +0100
commit12f681a099e339747f99d5275611ee373096a7a6 (patch)
tree2e2f8034dbe6387ba74d7083bb295d1062d519e9 /gcc/fortran/resolve.c
parentc6acea9d4fd505ca611df1f8b248bbbecaa4fef6 (diff)
downloadgcc-12f681a099e339747f99d5275611ee373096a7a6.zip
gcc-12f681a099e339747f99d5275611ee373096a7a6.tar.gz
gcc-12f681a099e339747f99d5275611ee373096a7a6.tar.bz2
re PR fortran/35681 (wrong result for vector subscripted array expression in MVBITS)
2008-11-01 Daniel Kraft <d@domob.eu> PR fortran/35681 * gfortran.h (struct gfc_code): New field `resolved_isym'. * trans.h (gfc_build_memcpy_call): Made public. * trans-array.h (gfc_trans_create_temp_array): New argument `initial'. * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym. * iresolve.c (create_formal_for_intents): New helper method. (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym. * resolve.c (resolve_call): Initialize resolved_isym to NULL. * trans-array.c (gfc_trans_allocate_array_storage): New argument `initial' to allow initializing the allocated storage to some initial value copied from another array. (gfc_trans_create_temp_array): Allow initialization of the temporary with a copy of some other array by using the new extension. (gfc_trans_array_constructor): Pass NULL_TREE for initial argument. (gfc_conv_loop_setup): Ditto. * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto. * trans-expr.c (gfc_conv_function_call): Ditto. (gfc_build_memcpy_call): Made public. * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created temporary for INTENT(INOUT) arguments to the value of the mirrored array and clean up the temporary as very last intructions in the created block. * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call and enable elemental dependency checking if we have. 2008-11-01 Daniel Kraft <d@domob.eu> PR fortran/35681 * gfortran.dg/mvbits_4.f90: New test. From-SVN: r141516
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index bccb46a..c03f6a6 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2913,23 +2913,26 @@ resolve_call (gfc_code *c)
t = SUCCESS;
if (c->resolved_sym == NULL)
- switch (procedure_kind (csym))
- {
- case PTYPE_GENERIC:
- t = resolve_generic_s (c);
- break;
+ {
+ c->resolved_isym = NULL;
+ switch (procedure_kind (csym))
+ {
+ case PTYPE_GENERIC:
+ t = resolve_generic_s (c);
+ break;
- case PTYPE_SPECIFIC:
- t = resolve_specific_s (c);
- break;
+ case PTYPE_SPECIFIC:
+ t = resolve_specific_s (c);
+ break;
- case PTYPE_UNKNOWN:
- t = resolve_unknown_s (c);
- break;
+ case PTYPE_UNKNOWN:
+ t = resolve_unknown_s (c);
+ break;
- default:
- gfc_internal_error ("resolve_subroutine(): bad function type");
- }
+ default:
+ gfc_internal_error ("resolve_subroutine(): bad function type");
+ }
+ }
/* Some checks of elemental subroutine actual arguments. */
if (resolve_elemental_actual (NULL, c) == FAILURE)