Patchwork [Fortran] Minor wording changed for gfc_error and polym. (intr.) assignment

login
register
mail settings
Submitter Tobias Burnus
Date Jan. 10, 2012, 6:47 a.m.
Message ID <4F0BDF03.3050509@net-b.de>
Download mbox | patch
Permalink /patch/135150/
State New
Headers show

Comments

Tobias Burnus - Jan. 10, 2012, 6:47 a.m.
Hi all,

that's a follow up to my review comment for 
http://gcc.gnu.org/ml/fortran/2012-01/msg00077.html

As stated, I think "in intrinsic assignment" makes the error message 
clearer and correcter.

Build and regtested on x86-64-linux.
OK for the trunk?

Tobias

PS: Other pending patches:
* http://gcc.gnu.org/ml/fortran/2012-01/msg00080.html - libgfortran SIG* 
update
* http://gcc.gnu.org/ml/fortran/2012-01/msg00059.html - 
allocate(character(len=...) ...) check

Patch

2012-01-09  Tobias Burnus  <burnus@net-b.de>

	* resolve.c (resolve_ordinary_assign): Improve error wording.

2012-01-09  Tobias Burnus  <burnus@net-b.de>

	* gfortran.dg/class_39.f03: Update dg-error string.

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(Revision 183034)
+++ gcc/fortran/resolve.c	(Arbeitskopie)
@@ -9208,8 +9223,8 @@  resolve_ordinary_assign (gfc_code *code, gfc_names
      and coindexed; cf. F2008, 7.2.1.2 and PR 43366.  */
   if (lhs->ts.type == BT_CLASS)
     {
-      gfc_error ("Variable must not be polymorphic in assignment at %L "
-		 "- check that there is a matching specific subroutine "
+      gfc_error ("Variable must not be polymorphic in intrinsic assignment at "
+		 "%L - check that there is a matching specific subroutine "
 		 "for '=' operator", &lhs->where);
       return false;
     }
Index: gcc/testsuite/gfortran.dg/class_39.f03
===================================================================
--- gcc/testsuite/gfortran.dg/class_39.f03	(Revision 183034)
+++ gcc/testsuite/gfortran.dg/class_39.f03	(Arbeitskopie)
@@ -8,6 +8,6 @@ 
   end type T
 contains
   class(T) function add()  ! { dg-error "must be dummy, allocatable or pointer" }
-    add = 1  ! { dg-error "Variable must not be polymorphic in assignment" }
+    add = 1  ! { dg-error "Variable must not be polymorphic in intrinsic assignment" }
   end function
 end