Commit 51a6a404 by Damian Rouson Committed by Steven G. Kargl

re PR fortran/91513 (Non-standard terminology in error message for pointer…

re PR fortran/91513 (Non-standard terminology in error message for pointer component assignment in pure procedure)

2019-10-13  Damian Rouson  <damain@sourceryinstitue.org>

	PR fortran/91513
	* resolve.c (resolve_ordinary_assign): Improved error message.

2019-10-13  Damian Rouson  <damain@sourceryinstitue.org>

	PR fortran/91513
	* gfortran.dg/impure_assignment_2.f90: Update dg-error regex.

From-SVN: r276941
parent 5284fba5
2019-10-13 Damian Rouson <damain@sourceryinstitue.org>
PR fortran/91513
* resolve.c (resolve_ordinary_assign): Improved error message.
2019-10-13 Steven G. Kargl <kargl@gcc.gnu.org> 2019-10-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90297 PR fortran/90297
......
...@@ -10769,9 +10769,12 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns) ...@@ -10769,9 +10769,12 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
"component in a PURE procedure", "component in a PURE procedure",
&rhs->where); &rhs->where);
else else
gfc_error ("The impure variable at %L is assigned to " /* F2008, C1283 (4). */
"a derived type variable with a POINTER " gfc_error ("In a pure subprogram an INTENT(IN) dummy argument "
"component in a PURE procedure (12.6)", "shall not be used as the expr at %L of an intrinsic "
"assignment statement in which the variable is of a "
"derived type if the derived type has a pointer "
"component at any level of component selection.",
&rhs->where); &rhs->where);
return rval; return rval;
} }
......
2019-10-13 Damian Rouson <damain@sourceryinstitue.org>
PR fortran/91513
* gfortran.dg/impure_assignment_2.f90: Update dg-error regex.
2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92017 PR fortran/92017
......
...@@ -40,7 +40,7 @@ CONTAINS ...@@ -40,7 +40,7 @@ CONTAINS
PURE FUNCTION give_next3(node) PURE FUNCTION give_next3(node)
TYPE(node_type), intent(in) :: node TYPE(node_type), intent(in) :: node
TYPE(node_type) :: give_next TYPE(node_type) :: give_next
give_next = node ! { dg-error "impure variable" } give_next = node ! { dg-error "pure subprogram" }
END FUNCTION END FUNCTION
END MODULE pr20863 END MODULE pr20863
......
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