diff options
author | dfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-19 18:26:12 +0000 |
---|---|---|
committer | dfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-19 18:26:12 +0000 |
commit | a046ed2b468c886ed8a9ed0793312fd4e04fca5d (patch) | |
tree | 5a464f82353ed0b3892d4e6fd74e63925a947643 | |
parent | f82220c24bb2d80fdce9eaf5fbbad33f06d9e25e (diff) | |
download | gcc-a046ed2b468c886ed8a9ed0793312fd4e04fca5d.tar.gz |
2008-02-19 Daniel Franke <franke.daniel@gmail.com>
PR fortran/35030
* expr.c (gfc_check_pointer_assign): Add type and kind information
to type-mismatch message.
(gfc_check_assign): Unify error messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132442 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 9 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c23b81f5e30..ea74958f3f9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2008-02-19 Daniel Franke <franke.daniel@gmail.com> + + PR fortran/35030 + * expr.c (gfc_check_pointer_assign): Add type and kind information + to type-mismatch message. + (gfc_check_assign): Unify error messages. + 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/34952 @@ -18,7 +25,7 @@ 2008-02-10 Daniel Franke <franke.daniel@gmail.com> - fortran/PR35019 + PR fortran/35019 * lang.opt: Allow '-J<dir>' next to '-J <dir>', likewise '-I <dir>' and '-I<dir>'. diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index ac159f5ce6c..bfb61fdf6a8 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2825,8 +2825,8 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) if (lvalue->ts.type == BT_LOGICAL && rvalue->ts.type == BT_LOGICAL) return SUCCESS; - gfc_error ("Incompatible types in assignment at %L, %s to %s", - &rvalue->where, gfc_typename (&rvalue->ts), + gfc_error ("Incompatible types in assignment at %L; attempted assignment " + "of %s to %s", &rvalue->where, gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts)); return FAILURE; @@ -2909,8 +2909,9 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) if (!gfc_compare_types (&lvalue->ts, &rvalue->ts)) { - gfc_error ("Different types in pointer assignment at %L", - &lvalue->where); + gfc_error ("Different types in pointer assignment at %L; attempted " + "assignment of %s to %s", &lvalue->where, + gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts)); return FAILURE; } |