Commit 26d3d4f4 by Jerry DeLisle

re PR fortran/41807 (data statement with nested type constructors)

2009-11-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/41807
	* decl.c (variable_decl): Do not error on initialization within a
	derived type specification of a pure procedure.

From-SVN: r154529
parent 0831e1d1
2009-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41807
* decl.c (variable_decl): Do not error on initialization within a
derived type specification of a pure procedure.
2009-11-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/42045
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment