------- Comment #1 from burnus at gcc dot gnu dot org 2007-07-24 17:22 -------
Confirmed.
The problem is that gfc_pure(NULL) is called and thus
sym = gfc_current_ns->proc_name;
is used as procedure symbol, which is "bar" and not "foo".
The following patch fixes this, but I have not regtested it.
Index: expr.c
===================================================================
--- expr.c (Revision 126873)
+++ expr.c (Arbeitskopie)
@@ -2734,7 +2743,7 @@
return FAILURE;
}
- is_pure = gfc_pure (NULL);
+ is_pure = gfc_pure (lvalue->symtree->n.sym->ns->proc_name);
if (is_pure && gfc_impure_variable (lvalue->symtree->n.sym))
{
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code,
| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2007-07-24 17:22:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32881