diff options
author | Mark Eggleston <mark.eggleston@codethink.com> | 2019-10-03 09:40:23 +0000 |
---|---|---|
committer | Mark Eggleston <markeggleston@gcc.gnu.org> | 2019-10-03 09:40:23 +0000 |
commit | f61e54e59cda5a2e281d525d3f87ffa179fae1ae (patch) | |
tree | 522705254b54086a43db1ff08a986353ea587ff9 /gcc/fortran/expr.c | |
parent | 38a734350fd787da1b4bcf9b4e0a99ed2adb5eae (diff) | |
download | gcc-f61e54e59cda5a2e281d525d3f87ffa179fae1ae.zip gcc-f61e54e59cda5a2e281d525d3f87ffa179fae1ae.tar.gz gcc-f61e54e59cda5a2e281d525d3f87ffa179fae1ae.tar.bz2 |
Character typenames in errors and warnings
Character type names now incorporate length, kind is only shown if
the default character is not being used.
Examples:
character(7) is reported as CHARACTER(7)
character(len=20,kind=4) is reported as CHARACTER(20,4)
dummy character variables with assumed length:
character(*) is reported as CHARACTER(*)
character(*,kind=4) is reported as CHARACTER(*,4)
From-SVN: r276505
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 5d3480e..9f638fe 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3693,8 +3693,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform, return true; gfc_error ("BOZ literal constant near %L cannot be assigned to a " - "%qs variable", &rvalue->where, gfc_typename (&lvalue->ts)); - + "%qs variable", &rvalue->where, gfc_typename (lvalue)); return false; } @@ -3726,7 +3725,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform, where = lvalue->where.lb ? &lvalue->where : &rvalue->where; gfc_error ("Incompatible types in DATA statement at %L; attempted " "conversion of %s to %s", where, - gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts)); + gfc_typename (rvalue), gfc_typename (lvalue)); return false; } @@ -4139,8 +4138,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, else if (!suppress_type_test) 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)); + gfc_typename (rvalue), gfc_typename (lvalue)); return false; } |