This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34901] add kind information to mismatched-types error message
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2008 11:02:40 -0000
- Subject: [Bug fortran/34901] add kind information to mismatched-types error message
- References: <bug-34901-13648@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-01-21 11:02 -------
Index: interface.c
===================================================================
--- interface.c (revision 131688)
+++ interface.c (working copy)
@@ -1475,6 +1475,12 @@ compare_parameter (gfc_symbol *formal, g
gfc_error ("Type mismatch in argument '%s' at %L; passed type(%s) to "
"type(%s)", formal->name, &actual->where,
actual->ts.derived->name, formal->ts.derived->name);
+ else if (where && actual->ts.type != BT_DERIVED
+ && formal->ts.type != BT_DERIVED)
+ gfc_error ("Type mismatch in argument '%s' at %L; passed %s(kind=%d) "
+ "to %s(kind=%d)", formal->name, &actual->where,
+ gfc_basic_typename (actual->ts.type), actual->ts.kind,
+ gfc_basic_typename (formal->ts.type), formal->ts.kind);
else if (where)
gfc_error ("Type mismatch in argument '%s' at %L; passed %s to %s",
formal->name, &actual->where,
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-21 11:02:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34901