aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2007-02-28 19:17:34 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2007-02-28 19:17:34 +0100
commit7193e30a4d1067cd466840228e24202dc3d0db03 (patch)
treebacd7b57f83fefa913ed4269c27c8400bffef845 /gcc/fortran/resolve.c
parentc2615f30311dc9f0427a14c6de5295af2d862fc0 (diff)
downloadgcc-7193e30a4d1067cd466840228e24202dc3d0db03.zip
gcc-7193e30a4d1067cd466840228e24202dc3d0db03.tar.gz
gcc-7193e30a4d1067cd466840228e24202dc3d0db03.tar.bz2
re PR fortran/30888 (%VAL construct fails with argument procedures)
2007-02-28 Tobias Burnus <burnus@net-b.de> Paul Thomas <pault@gcc.gnu.org> PR fortran/30888 PR fortran/30887 * resolve.c (resolve_actual_arglist): Allow by-value arguments and non-default-kind for %VAL(). * trans-expr.c (conv_arglist_function): Allow non-default-kind for %VAL(). testsuite/ 2007-02-28 Tobias Burnus <burnus@net-b.de> Paul Thomas <pault@gcc.gnu.org> PR fortran/30888 PR fortran/30887 * c_by_val_1.f: Test %VAL() with non-default kind. * c_by_val.c: Ditto. * c_by_val_4.f: New test. Co-Authored-By: Paul Thomas <pault@gcc.gnu.org> From-SVN: r122409
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index a66d1ae..987d73b 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1016,22 +1016,14 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype)
since same file external procedures are not resolvable
in gfortran, it is a good deal easier to leave them to
intrinsic.c. */
- if (ptype != PROC_UNKNOWN && ptype != PROC_EXTERNAL)
+ if (ptype != PROC_UNKNOWN
+ && ptype != PROC_DUMMY
+ && ptype != PROC_EXTERNAL)
{
gfc_error ("By-value argument at %L is not allowed "
"in this context", &e->where);
return FAILURE;
}
-
- if (((e->ts.type == BT_REAL || e->ts.type == BT_COMPLEX)
- && e->ts.kind > gfc_default_real_kind)
- || (e->ts.kind > gfc_default_integer_kind))
- {
- gfc_error ("Kind of by-value argument at %L is larger "
- "than default kind", &e->where);
- return FAILURE;
- }
-
}
/* Statement functions have already been excluded above. */