aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 0f33608..35a3496 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -1541,9 +1541,19 @@ gfc_add_procedure (symbol_attribute *attr, procedure_type t,
if (attr->proc != PROC_UNKNOWN && !attr->module_procedure)
{
- gfc_error ("%s procedure at %L is already declared as %s procedure",
+ if (attr->proc == PROC_ST_FUNCTION && t == PROC_INTERNAL
+ && !gfc_notification_std (GFC_STD_F2008))
+ gfc_error ("%s procedure at %L is already declared as %s "
+ "procedure. \nF2008: A pointer function assignment "
+ "is ambiguous if it is the first executable statement "
+ "after the specification block. Please add any other "
+ "kind of executable statement before it. FIXME",
gfc_code2string (procedures, t), where,
gfc_code2string (procedures, attr->proc));
+ else
+ gfc_error ("%s procedure at %L is already declared as %s "
+ "procedure", gfc_code2string (procedures, t), where,
+ gfc_code2string (procedures, attr->proc));
return false;
}