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/check.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/check.c')
-rw-r--r-- | gcc/fortran/check.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 98203bc..87a8196 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -2266,7 +2266,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image, { gfc_error ("The A argument at %L has type %s but the function passed as " "OPERATOR at %L returns %s", - &a->where, gfc_typename (&a->ts), &op->where, + &a->where, gfc_typename (a), &op->where, gfc_typename (&sym->result->ts)); return false; } @@ -2276,7 +2276,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image, gfc_error ("The function passed as OPERATOR at %L has arguments of type " "%s and %s but shall have type %s", &op->where, gfc_typename (&formal->sym->ts), - gfc_typename (&formal->next->sym->ts), gfc_typename (&a->ts)); + gfc_typename (&formal->next->sym->ts), gfc_typename (a)); return false; } if (op->rank || attr.allocatable || attr.pointer || formal->sym->as @@ -2844,7 +2844,7 @@ gfc_check_eoshift (gfc_expr *array, gfc_expr *shift, gfc_expr *boundary, "of type %qs", gfc_current_intrinsic_arg[2]->name, gfc_current_intrinsic, &array->where, gfc_current_intrinsic_arg[0]->name, - gfc_typename (&array->ts)); + gfc_typename (array)); return false; } } @@ -4808,7 +4808,7 @@ gfc_check_same_type_as (gfc_expr *a, gfc_expr *b) "cannot be of type %s", gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, - &a->where, gfc_typename (&a->ts)); + &a->where, gfc_typename (a)); return false; } @@ -4827,7 +4827,7 @@ gfc_check_same_type_as (gfc_expr *a, gfc_expr *b) "cannot be of type %s", gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, - &b->where, gfc_typename (&b->ts)); + &b->where, gfc_typename (b)); return false; } |