[Patch, fortran] Bug 68241 - [meta-bug] Deferred-length character - PRs50221, 68216 and 67674
Dominique d'Humières
dominiq@lps.ens.fr
Tue Nov 10 15:39:00 GMT 2015
Dear Paul,
The patch for gcc/fortran/trans-types.c does not apply on revision r230071 and I had to use
--- ../_clean/gcc/fortran/trans-types.c 2015-11-08 18:04:13.000000000 +0100
+++ gcc/fortran/trans-types.c 2015-11-10 11:57:33.000000000 +0100
@@ -1455,7 +1455,13 @@ gfc_get_dtype_rank_type (int rank, tree
}
gcc_assert (rank <= GFC_DTYPE_RANK_MASK);
- size = TYPE_SIZE_UNIT (etype);
+
+ if (TREE_CODE (etype) == ARRAY_TYPE
+ && TYPE_MAXVAL (TYPE_DOMAIN (etype)) != NULL_TREE
+ && TREE_CODE (TYPE_MAXVAL (TYPE_DOMAIN (etype))) == VAR_DECL)
+ size = TYPE_MAXVAL (TYPE_DOMAIN (etype));
+ else
+ size = TYPE_SIZE_UNIT (etype);
i = rank | (n << GFC_DTYPE_TYPE_SHIFT);
if (size && INTEGER_CST_P (size))
which I hope is correct.
With the patch (and a few others!-) I have regstrapped without any regression. The tests in pr50221 are fixed except the one in comment 4, the output is
4 4
A
CDV
?
I have also found that pr63932 and pr66408 are fixed by the patch.
Thanks for your work on this issue,
Dominique
> Le 10 nov. 2015 à 10:48, Paul Richard Thomas <paul.richard.thomas@gmail.com> a écrit :
>
> Dear Steve,
>
> I was charging around like a mad thing yesterday and sent the
> submission in something of a hurry. Thanks for pointing out the
> omission so quickly.
>
> Please find the patch attached.
>
> Cheers
>
> Paul
>
More information about the Fortran
mailing list