diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 640681b..f426aa2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2008-01-31 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/34910 + * expr.c (gfc_check_assign): It is an error to assign + to a sibling procedure. + 2008-01-30 Paul Thomas <pault@gcc.gnu.org> PR fortran/34975 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index fb1886e..ac159f5 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2705,6 +2705,15 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) bad_proc = true; } + /* (iv) Host associated and not the function symbol or the + parent result. This picks up sibling references, which + cannot be entries. */ + if (!sym->attr.entry + && sym->ns == gfc_current_ns->parent + && sym != gfc_current_ns->proc_name + && sym != gfc_current_ns->parent->proc_name->result) + bad_proc = true; + if (bad_proc) { gfc_error ("'%s' at %L is not a VALUE", sym->name, &lvalue->where); |