public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dominique d'Humières" <dominiq@lps.ens.fr>
To: fortran@gcc.gnu.org
Cc: Paul Richard Thomas <paul.richard.thomas@gmail.com>,
	       Thomas Koenig <tkoenig@netcologne.de>,
	       gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] PR 65751 Bogus &L in error message
Date: Tue, 17 Nov 2015 09:53:00 -0000	[thread overview]
Message-ID: <D89F5DCA-C307-40DC-881F-D4B788699161@lps.ens.fr> (raw)

Is the following patch OK for trunk and 5.3? 

I have used the legalese found in my draft for Fortran 2015.
Would it be acceptable to replace 
"with the BIND attribute or the SEQUENCE attribute" 
with
"with the BIND or SEQUENCE attribute"?

Dominique

Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(revision 230455)
+++ gcc/fortran/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+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>
 
 	PR fortran/58027
Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c	(revision 230455)
+++ gcc/fortran/expr.c	(working copy)
@@ -3632,11 +3632,10 @@
 	       || (lvalue->ts.type == BT_DERIVED
 		   && (lvalue->ts.u.derived->attr.is_bind_c
 		       || lvalue->ts.u.derived->attr.sequence))))
-	gfc_error ("Data-pointer-object &L must be unlimited "
-		   "polymorphic, a sequence derived type or of a "
-		   "type with the BIND attribute assignment at %L "
-		   "to be compatible with an unlimited polymorphic "
-		   "target", &lvalue->where);
+	gfc_error ("Data-pointer-object at %L must be unlimited "
+		   "polymorphic, or of a type with the BIND attribute "
+		   "or the SEQUENCE attribute, to be compatible with "
+		   "an unlimited polymorphic target", &lvalue->where);
       else
 	gfc_error ("Different types in pointer assignment at %L; "
 		   "attempted assignment of %s to %s", &lvalue->where,
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 230455)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2015-11-17  Dominique d'Humieres <dominiq@lps.ens.fr>
+
+	PR fortran/65751
+	* gfortran.dg/unlimited_polymorphic_2.f03: Update test.
+
 2015-11-17  Uros Bizjak  <ubizjak@gmail.com>
 
 	* gcc.dg/torture/pr68264.c: Use dg-add-options ieee.
Index: gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03
===================================================================
--- gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03	(revision 230455)
+++ gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03	(working copy)
@@ -48,7 +48,7 @@
     call foo (y)
 
     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
       type is (integer)

             reply	other threads:[~2015-11-17  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  9:53 Dominique d'Humières [this message]
2015-11-17 14:54 ` Steve Kargl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D89F5DCA-C307-40DC-881F-D4B788699161@lps.ens.fr \
    --to=dominiq@lps.ens.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul.richard.thomas@gmail.com \
    --cc=tkoenig@netcologne.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).