From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Mark Eggleston <mark.eggleston@codethink.co.uk>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [PATCH] Fortran - character type names in errors and warning - for review'
Date: Thu, 12 Sep 2019 21:00:00 -0000 [thread overview]
Message-ID: <20190912210029.GA38850@troutmask.apl.washington.edu> (raw)
In-Reply-To: <ffb60571-24de-5270-1b35-91dad0e4429e@codethink.co.uk>
On Mon, Sep 09, 2019 at 02:52:20PM +0100, Mark Eggleston wrote:
> gcc/fortran
>
> Â Â Â Mark Eggleston <mark.eggleston@codethink.com>
>
> Â Â Â * arith.c (gfc_arith_concat): Set length field in typespec.
> Â Â Â * expr.c (gfc_get_character_expr): Set length field in typespec.
> Â Â Â * gfortran.h: Add length field to gfc_typespec for use to allow the
> Â Â Â length to available for character literals.
> Â Â Â * interface.c (gfc_check_dummy_characteristics): Use gfc_dummy_typename
> Â Â Â instead of gfc_typename when constructing error message to allow for
> Â Â Â CHARACTER(*) and CHARACTER(*,4).
> Â Â Â (compare_parameter): Use gfc_dummy_typename for formal argument when
> Â Â Â constructing error message to allow for CHARACTER(*) and
> Â Â Â CHARACTER(*,4).
> Â Â Â * intrinsic.c (gfc_actual_arglist): Reword error message so that
>    CHARACTER(*) or CHARACTER(*,4) can be reported as the target type. Use
> Â Â Â gfc_dummy_typename for the formal argument.
> Â Â Â * misc.c (gfc_typename): Add new local variable length and initialise
>    with the value from the length field in typespec passed in. If there
>    is a character structure use the value from there for length. If the
> Â Â Â kind is the default character kind construct the type name using length
> Â Â Â otherwise use the length followed by kind separated by a comma.
> Â Â Â (gfc_dummy_typename): New routine for use with formal arguments, if the
> Â Â Â typespec does not have a character length structure then the length is
> Â Â Â assumed and * is used for the length, if kind is not the default
> Â Â Â character kind follow * with a comma and then the kind.
>
> gcc/testsuite
>
> Â Â Â Mark Eggleston <mark.eggleston@codethink.com>
>
> Â Â Â * gfortran.dg/bad_operands.f90: New test.
> Â Â Â * gfortran.dg/character mismatch.f90: New test.
> Â Â Â * gfortran.dg/compare_interfaces.f90: New test.
> Â Â Â * gfortran.dg/widechar_intrinsics_1.f90: Checked for specific character
> Â Â Â type names instead of "Type of argument".
> Â Â Â * gfortran.dg/widechar_intrinsics_2.f90: Checked for specific character
> Â Â Â type names instead of "Type of argument".
> Â Â Â * gfortran.dg/widechar_intrinsics_3.f90: Checked for specific character
> Â Â Â type names instead of "Type of argument".
>
This looks OK to me. I don't know if anyone else will
glance at the patch. You said that the patch has the
feeling of a kludge. This is probably a by-product of
bolting kind=4 support onto what gfortran inherited long
ago.
--
steve
next prev parent reply other threads:[~2019-09-12 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 13:52 [PATCH] Fortran - character type names in errors and warning - for review Mark Eggleston
2019-09-12 21:00 ` Steve Kargl [this message]
2019-09-13 6:54 ` Janne Blomqvist
2019-09-13 7:34 ` Mark Eggleston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190912210029.GA38850@troutmask.apl.washington.edu \
--to=sgk@troutmask.apl.washington.edu \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=mark.eggleston@codethink.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).