------- Comment #7 from jvdelisle at gcc dot gnu dot org 2009-11-24 04:32
-------
This seems to do the trick:
Index: decl.c
===================================================================
--- decl.c (revision 154430)
+++ decl.c (working copy)
@@ -1865,7 +1865,7 @@ variable_decl (int elem)
m = MATCH_ERROR;
}
- if (gfc_pure (NULL))
+ if (gfc_pure (NULL) && gfc_state_stack->state != COMP_DERIVED)
{
gfc_error ("Initialization of pointer at %C is not allowed in "
"a PURE procedure");
None of the examples have any save attributes set, implied or otherwise. This
patch allows the initial three examples and rejects the example in comment #4.
Is this what we are looking for?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42008