aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorErik Edelmann <eedelman@gcc.gnu.org>2006-03-05 19:24:48 +0000
committerErik Edelmann <eedelman@gcc.gnu.org>2006-03-05 19:24:48 +0000
commitaa08038dda94c80126a2ac54e8bab0964a95bf41 (patch)
treed1b0048a6e28bab0dfa55b141c9b8fb3793db643 /gcc/fortran/trans-expr.c
parent68c9b7d60a71b8ab9e0ebe692f74aedb61a95af1 (diff)
downloadgcc-aa08038dda94c80126a2ac54e8bab0964a95bf41.zip
gcc-aa08038dda94c80126a2ac54e8bab0964a95bf41.tar.gz
gcc-aa08038dda94c80126a2ac54e8bab0964a95bf41.tar.bz2
re PR fortran/16136 (Conflicting attributes ALLOCATABLE, DUMMY (F2003))
fortran/ 2005-03-05 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/16136 * symbol.c (conf_std): New macro. (check_conflict): Use it to allow ALLOCATABLE dummy arguments for F2003. * trans-expr.c (gfc_conv_function_call): Pass the address of the array descriptor when dummy argument is ALLOCATABLE. * interface.c (compare_allocatable): New function. (compare_actual_formal): Use it. resolve.c (resolve_deallocate_expr, resolve_allocate_expr): Check that INTENT(IN) variables aren't (de)allocated. * gfortran.texi (Fortran 2003 status): List ALLOCATABLE dummy arguments as supported. testsuite/ 2005-03-05 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/16136 * allocatable_dummy_1.f90: New. * allocatable_dummy_2.f90: New. From-SVN: r111741
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 9f5774b..1fc7f06 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1870,16 +1870,15 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
}
else
{
- /* If the procedure requires an explicit interface, the
- actual argument is passed according to the
- corresponding formal argument. If the corresponding
- formal argument is a POINTER or assumed shape, we do
- not use g77's calling convention, and pass the
- address of the array descriptor instead. Otherwise we
- use g77's calling convention. */
+ /* If the procedure requires an explicit interface, the actual
+ argument is passed according to the corresponding formal
+ argument. If the corresponding formal argument is a POINTER,
+ ALLOCATABLE or assumed shape, we do not use g77's calling
+ convention, and pass the address of the array descriptor
+ instead. Otherwise we use g77's calling convention. */
int f;
f = (formal != NULL)
- && !formal->sym->attr.pointer
+ && !(formal->sym->attr.pointer || formal->sym->attr.allocatable)
&& formal->sym->as->type != AS_ASSUMED_SHAPE;
f = f || !sym->attr.always_explicit;
if (arg->expr->expr_type == EXPR_VARIABLE