https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51993

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Changing the gcc_assert to an early return gives ...

Confirmed with the patch

--- ../_clean/gcc/fortran/decl.c        2015-10-27 18:14:22.000000000 +0100
+++ gcc/fortran/decl.c  2015-10-29 12:02:02.000000000 +0100
@@ -1293,7 +1293,9 @@ gfc_set_constant_character_len (int len,
   int slen;

   gcc_assert (expr->expr_type == EXPR_CONSTANT);
-  gcc_assert (expr->ts.type == BT_CHARACTER);
+  /* gcc_assert (expr->ts.type == BT_CHARACTER); */
+  if (expr->ts.type != BT_CHARACTER)
+    return;

   slen = expr->value.character.length;
   if (len != slen)

No regression.

Reply via email to