summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-21 18:33:10 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-21 18:33:10 +0000
commite1361bdf5da2fab397496f250ba344fed3d0988e (patch)
tree4c9b1deb5aa24b11984be9fd982a4a7a7d8401cb
parent2a2aef735be22819514a890ea429d8846f183961 (diff)
downloadppe42-gcc-e1361bdf5da2fab397496f250ba344fed3d0988e.tar.gz
ppe42-gcc-e1361bdf5da2fab397496f250ba344fed3d0988e.zip
2007-01-21 Tobias Burnus <burnus@net-b.de>
PR fortran/34901 * interface.c (compare_parameter): Improved error message for arguments of same type and mismatched kinds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131700 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/interface.c14
2 files changed, 9 insertions, 11 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 86b028231b9..6446e95638f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34901
+ * interface.c (compare_parameter): Improved error message
+ for arguments of same type and mismatched kinds.
+
2008-01-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34861
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 8b1f5db21dc..ef639845c78 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1470,18 +1470,10 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
if ((actual->expr_type != EXPR_NULL || actual->ts.type != BT_UNKNOWN)
&& !gfc_compare_types (&formal->ts, &actual->ts))
{
- if (where && actual->ts.type == BT_DERIVED
- && formal->ts.type == BT_DERIVED)
- 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)
+ if (where)
gfc_error ("Type mismatch in argument '%s' at %L; passed %s to %s",
- formal->name, &actual->where,
- actual->ts.type == BT_DERIVED ? "derived type"
- : gfc_basic_typename (actual->ts.type),
- formal->ts.type == BT_DERIVED ? "derived type"
- : gfc_basic_typename (formal->ts.type));
+ formal->name, &actual->where, gfc_typename (&actual->ts),
+ gfc_typename (&formal->ts));
return 0;
}
OpenPOWER on IntegriCloud