Commit 83be3fe5 by Dominique d'Humieres Committed by Dominique d'Humieres

re PR fortran/65751 (Bogus &L in error message)

2015-11-17  Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/65751
	* expr.c (gfc_check_pointer_assign): Fix error message.

	* gfortran.dg/unlimited_polymorphic_2.f03: Update test.

From-SVN: r230465
parent df94599f
2015-11-17 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/65751
* expr.c (gfc_check_pointer_assign): Fix error message.
2015-11-16 Steven G. Kargl <kargl@gcc.gnu.org> 2015-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58027 PR fortran/58027
......
...@@ -3632,11 +3632,10 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) ...@@ -3632,11 +3632,10 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
|| (lvalue->ts.type == BT_DERIVED || (lvalue->ts.type == BT_DERIVED
&& (lvalue->ts.u.derived->attr.is_bind_c && (lvalue->ts.u.derived->attr.is_bind_c
|| lvalue->ts.u.derived->attr.sequence)))) || lvalue->ts.u.derived->attr.sequence))))
gfc_error ("Data-pointer-object &L must be unlimited " gfc_error ("Data-pointer-object at %L must be unlimited "
"polymorphic, a sequence derived type or of a " "polymorphic, or of a type with the BIND or SEQUENCE "
"type with the BIND attribute assignment at %L " "attribute, to be compatible with an unlimited "
"to be compatible with an unlimited polymorphic " "polymorphic target", &lvalue->where);
"target", &lvalue->where);
else else
gfc_error ("Different types in pointer assignment at %L; " gfc_error ("Different types in pointer assignment at %L; "
"attempted assignment of %s to %s", &lvalue->where, "attempted assignment of %s to %s", &lvalue->where,
......
2015-11-17 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/65751
* gfortran.dg/unlimited_polymorphic_2.f03: Update test.
2015-11-17 Ilya Enkovich <enkovich.gnu@gmail.com> 2015-11-17 Ilya Enkovich <enkovich.gnu@gmail.com>
PR middle-end/68134 PR middle-end/68134
......
...@@ -48,7 +48,7 @@ contains ...@@ -48,7 +48,7 @@ contains
call foo (y) call foo (y)
y => tgt ! This is OK, of course. y => tgt ! This is OK, of course.
tgt => y ! { dg-error "must be unlimited polymorphic" } tgt => y ! { dg-error "Data-pointer-object at .1. must be unlimited polymorphic" }
select type (y) ! This is the correct way to accomplish the previous select type (y) ! This is the correct way to accomplish the previous
type is (integer) type is (integer)
......
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