On Mon, Sep 09, 2019 at 02:52:20PM +0100, Mark Eggleston wrote:
> gcc/fortran
> 
>      Mark Eggleston <mark.eggles...@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.eggles...@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

Reply via email to