summaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-18 18:55:01 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-18 18:55:01 +0000
commit14efb9b7b52e816aa93ea4a451b5c10eb7634a8b (patch)
tree604f003d8d69e4a1d7d99ba57be29731e7ace010 /gcc/fortran/resolve.c
parent94543d6987c66b013d7599bdccf58c2f37a4f12f (diff)
downloadgcc-14efb9b7b52e816aa93ea4a451b5c10eb7634a8b.tar.gz
2006-01-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20869 PR fortran/20875 PR fortran/25024 * symbol.c (check_conflict): Add pointer valued elemental functions and internal procedures with the external attribute to the list of conflicts. (gfc_add_attribute): New catch-all function to perform the checking of symbol attributes for attribute declaration statements. * decl.c (attr_decl1): Call gfc_add_attribute for each of - (gfc_match_external, gfc_match_intent, gfc_match_intrinsic, gfc_match_pointer, gfc_match_dimension, gfc_match_target): Remove spurious calls to checks in symbol.c. Set the attribute directly and use the call to attr_decl() for checking. * gfortran.h: Add prototype for gfc_add_attribute. PR fortran/25785 * resolve.c (resolve_function): Exclude PRESENT from assumed size argument checking. Replace strcmp's with comparisons with generic codes. 2006-01-18 Paul Thomas <pault@gcc.gnu.org> Steven G. Kargl <kargls@comcast.net> PR fortran/20869 * gfortran.dg/intrinsic_external_1.f90: New test. PR fortran/20875. * gfortran.dg/elemental_pointer_1.f90: New test. PR fortran/25024 * gfortran.dg/external_procedures_1.f90: New test. PR fortran/25785 gfortran.dg/assumed_present.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109899 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 1169842a571..f51fcf8bcc4 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1235,16 +1235,17 @@ resolve_function (gfc_expr * expr)
}
else if (expr->value.function.actual != NULL
- && expr->value.function.isym != NULL
- && strcmp (expr->value.function.isym->name, "lbound"))
+ && expr->value.function.isym != NULL
+ && expr->value.function.isym->generic_id != GFC_ISYM_LBOUND
+ && expr->value.function.isym->generic_id != GFC_ISYM_PRESENT)
{
/* Array instrinsics must also have the last upper bound of an
asumed size array argument. UBOUND and SIZE have to be
excluded from the check if the second argument is anything
than a constant. */
int inquiry;
- inquiry = strcmp (expr->value.function.isym->name, "ubound") == 0
- || strcmp (expr->value.function.isym->name, "size") == 0;
+ inquiry = expr->value.function.isym->generic_id == GFC_ISYM_UBOUND
+ || expr->value.function.isym->generic_id == GFC_ISYM_SIZE;
for (arg = expr->value.function.actual; arg; arg = arg->next)
{