[Patch, fortran] Bug 68241 - [meta-bug] Deferred-length character - PRs50221, 68216 and 67674
Paul Richard Thomas
paul.richard.thomas@gmail.com
Thu Nov 12 13:14:00 GMT 2015
Hi Dominique,
Are you sure about pr50221 #4? It runs fine for me.
I have attached the testcases for PRs 50221#4, 63932, and 66408. I
propose to add these to the commit, once I get approval.....
I have a further patch for pr49954, which nearly fixes the testcase in
the PR but is not quite there. However, concatenation is in general
fixed, when there is no dependency. When there is, the lhs string
lengt gets updated before the concatenation, thereby shifting the op2
part of the concatenation. It'll be another few days....
Cheers
Paul
On 10 November 2015 at 16:39, Dominique d'Humières <dominiq@lps.ens.fr> wrote:
> 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
>>
>
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_character_4.f90
Type: text/x-fortran
Size: 779 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20151112/b606c91c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_character_5.f90
Type: text/x-fortran
Size: 651 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20151112/b606c91c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_character_6.f90
Type: text/x-fortran
Size: 1137 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20151112/b606c91c/attachment-0002.bin>
More information about the Fortran
mailing list