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: PR85868 - Subarray of a pointer array associated with a pointer dummy argument


Thomas, Steve,

I'll try your suggestions when I get back to this PR.

(I just learned that even initialization of string constants
is a wonderland when TRANSFER or Hollerith is involved...).

Thanks,
Harald

On 01/31/19 22:43, Steve Kargl wrote:
> On Thu, Jan 31, 2019 at 10:20:41PM +0100, Thomas Koenig wrote:
>> Hi Harald,
>>
>>> I got caught by the above wrong-code bug which is most certainly beyond
>>> my current level of insight into gfortran.  Is somebody willing to guide
>>> me into the relevant area of code that is related to pointer assignment,
>>> as well as resolution of pointer dummy arguments?
>>
>> Unfortunately, my own knowledge of this area is dim at best.  I have just
>> recently begun to make forays into trans-*.c.
>>
>> Your best bet is probably to set a breakpoint in
>> gfc_conv_array_parameter, then step through it for a test case, and
>> watch where things happen - especially where an array descriptor
>> is created.
>>
>>> My impression is that the above PR can be fixed by properly assigning
>>> the pointer dummy argument to the target "just" by following the
>>> ordinary rules for pointer association.
>>
>> Probably. I have little doubt that there is a function which does
>> exactly what is needed, it is just a matter of finding it and putting
>> it in the right place :-)
>>
> 
> Other places to start
> 
> interface.c:
> gfc_check_dummy_characteristics
> gfc_check_result_characteristics
> gfc_match_interface
> 
> resolve.c:
> resolve_actual_arglist
> resolve_formal_arglists
> check_argument_lists
> 


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