This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR55901 - [OOP] type is (character(len=*)) misinterpreted as array - part 1


Dear All,

Steve Kargl has pointed out to me that the attachment was a null
attachment. As is well known, these are the Swiss Army knife of
patches and  will fix anything. In fact, this patch was already posted
long while since with the PR. However, since I am now in a slightly
more pedestrian mood, I have attached it to this message too :-)

Cheers

Paul

On 17 January 2015 at 11:55, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dear All,
>
> The attached patch fixes the confusion between substrings of character
> associate-names and scalars being misused as arrays.
>
> It is sufficiently obvious and has been tested by Dominique that I
> will commit it later today if there are no opinions to the contrary.
>
> I will now turn my attention to Andre's patches for PR60357 and PR61275.
>
> Afterwards, I will fix the rest of the fix for this PR, via Andre's
> patch for PR60255 and the query in the final message in the thread.
>
> Bootstrapped and regtested on x86_64/FC21 - OK for trunk?
>
> Cheers
>
> Paul
>
> 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
>
>     PR fortran/55901
>     * primary.c (gfc_match_varspec): Exclude dangling associate-
>     names with dimension 0 from being counted as arrays.
>     * resolve.c (resolve_assoc_var): Sub-strings are permissible
>     for associate-names, so exclude characters from the test for
>     misuse as arrays.
>     * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
>     the hidden string length variable of their associated target.
>     Signal this by setting 'length' to a constant, if the decl for
>     the string length is a variable.
>
>
> 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
>
>     PR fortran/55901
>     * gfortran.dg/associate_1.f03: Allow test for character with
>     automatic length.
>
>
> --
> Outside of a dog, a book is a man's best friend. Inside of a dog it's
> too dark to read.
>
> Groucho Marx



-- 
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.

Groucho Marx

Attachment: submit.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]