From 6bfab0c07c4d636e368380d8804131d2bfaf6ff0 Mon Sep 17 00:00:00 2001 From: pault Date: Sat, 7 Jan 2006 14:14:08 +0000 Subject: 2006-01-07 Paul Thomas PR fortran/22146 * trans-array.c (gfc_reverse_ss): Remove static attribute. (gfc_walk_elemental_function_args): Replace gfc_expr * argument for the function call with the corresponding gfc_actual_arglist*. Change code accordingly. (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args now requires the actual argument list instead of the expression for the function call. * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args and provide a prototype for gfc_reverse_ss. * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case where an elemental subroutine has array valued actual arguments. PR fortran/25029 PR fortran/21256 PR fortran/20868 PR fortran/20870 * resolve.c (check_assumed_size_reference): New function to check for upper bound in assumed size array references. (resolve_assumed_size_actual): New function to do a very restricted scan of actual argument expressions of those procedures for which incomplete assumed size array references are not allowed. (resolve_function, resolve_call): Switch off assumed size checking of actual arguments, except for elemental procedures and intrinsic inquiry functions, in some circumstances. (resolve_variable): Call check_assumed_size_reference. 2006-01-07 Paul Thomas PR fortran/22146 * gfortran.dg/elemental_subroutine_1.f90: New test. * gfortran.dg/elemental_subroutine_2.f90: New test. PR fortran/25029 PR fortran/21256 * gfortran.dg/assumed_size_refs_1.f90: New test. PR fortran/20868 PR fortran/20870 * gfortran.dg/assumed_size_refs_2.f90: New test. * gfortran.dg/initialization_1.f90: Change warning message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109449 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/trans-array.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/trans-array.h') diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index 8ceced9f9e3..564e6490a26 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -48,11 +48,14 @@ void gfc_trans_static_array_pointer (gfc_symbol *); /* Generate scalarization information for an expression. */ gfc_ss *gfc_walk_expr (gfc_expr *); -/* Walk the arguments of an intrinsic function. */ -gfc_ss *gfc_walk_elemental_function_args (gfc_ss *, gfc_expr *, gfc_ss_type); +/* Walk the arguments of an elemental function. */ +gfc_ss *gfc_walk_elemental_function_args (gfc_ss *, gfc_actual_arglist *, + gfc_ss_type); /* Walk an intrinsic function. */ gfc_ss *gfc_walk_intrinsic_function (gfc_ss *, gfc_expr *, gfc_intrinsic_sym *); +/* Reverse the order of an SS chain. */ +gfc_ss *gfc_reverse_ss (gfc_ss *); /* Free the SS associated with a loop. */ void gfc_cleanup_loop (gfc_loopinfo *); -- cgit v1.2.1