diff options
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 9da654e..32aae0e 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1776,7 +1776,7 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2, } else { - /* Only check type and rank. */ + /* Operators: Only check type and rank of arguments. */ if (!compare_type (f2->sym, f1->sym)) { if (errmsg != NULL) @@ -1794,6 +1794,15 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2, symbol_rank (f2->sym)); return false; } + if ((gfc_option.allow_std & GFC_STD_F2008) + && (compare_ptr_alloc(f1->sym, f2->sym) + || compare_ptr_alloc(f2->sym, f1->sym))) + { + if (errmsg != NULL) + snprintf (errmsg, err_len, "Mismatching POINTER/ALLOCATABLE " + "attribute in argument '%s' ", f1->sym->name); + return false; + } } } |