aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/misc.c')
-rw-r--r--gcc/fortran/misc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c
index 0fc25df..65bcfa6 100644
--- a/gcc/fortran/misc.c
+++ b/gcc/fortran/misc.c
@@ -122,7 +122,7 @@ gfc_basic_typename (bt type)
the argument list of a single statement. */
const char *
-gfc_typename (gfc_typespec *ts)
+gfc_typename (gfc_typespec *ts, bool for_hash)
{
static char buffer1[GFC_MAX_SYMBOL_LEN + 7]; /* 7 for "TYPE()" + '\0'. */
static char buffer2[GFC_MAX_SYMBOL_LEN + 7];
@@ -149,6 +149,12 @@ gfc_typename (gfc_typespec *ts)
sprintf (buffer, "LOGICAL(%d)", ts->kind);
break;
case BT_CHARACTER:
+ if (for_hash)
+ {
+ sprintf (buffer, "CHARACTER(%d)", ts->kind);
+ break;
+ }
+
if (ts->u.cl && ts->u.cl->length)
length = gfc_mpz_get_hwi (ts->u.cl->length->value.integer);
if (ts->kind == gfc_default_character_kind)
@@ -397,7 +403,7 @@ gfc_closest_fuzzy_match (const char *typo, char **candidates)
likely to be meaningless. */
if (best)
{
- unsigned int cutoff = MAX (tl, strlen (best)) / 2;
+ unsigned int cutoff = MAX (tl, strlen (best));
if (best_distance > cutoff)
{