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
This commit is contained in:
Jerry DeLisle 2009-11-25 02:37:57 +00:00
parent 0831e1d149
commit 26d3d4f4dc
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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");