This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34910] [4.2/4.3 Regression] ICE on invalid assignments in doubly-contained functions



------- Comment #3 from pault at gcc dot gnu dot org  2008-01-30 22:42 -------
(In reply to comment #0)

> Problem seems to be in expr.c (gfc_check_assign):2690. If the containing
> namespace is a function, the appropriate tests are skipped.

This is regtesting right now:

Index: gcc/fortran/expr.c
===================================================================
*** gcc/fortran/expr.c  (revision 131741)
--- gcc/fortran/expr.c  (working copy)
*************** gfc_check_assign (gfc_expr *lvalue, gfc_
*** 2705,2710 ****
--- 2705,2718 ----
            bad_proc = true;
        }

+       /* (iv) Host associated and not the function symbol or the
+             parent result.  */
+       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);


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-01-27 19:21:07         |2008-01-30 22:42:53
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34910


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]