I too had some considerable difficulty on this point. I wasn't at all sure that the C world view was relevant here since the API includes CFI_address and, in principle, one could reference directly the elements pointed to by base_addr. However, I bow to the wisdom of your correspondents on the j3 list :-)
OK for both trunk and 9-branch. Thanks for the patch. Paul On Tue, 12 Nov 2019 at 20:25, Tobias Burnus <tob...@codesourcery.com> wrote: > > Hi all, > > On 11/12/19 3:42 PM, Tobias Burnus wrote: > > (2) CFI_establish: For allocatables, it is clear – base_addr == NULL. > > For pointers, it is clear as well – it has to be '0' according to the > > standard. But for CFI_attribute_other … I have now asked at > > https://mailman.j3-fortran.org/pipermail/j3/2019-November/thread.html#11740 > > > > While I still have problems to decipher the standard, regarding > CFI_establish, Steve L wrote: > > "In the C descriptor world, arrays start at zero as they do in C. The > only way they can become non-zero is through argument association, > allocation or pointer association as specified in 18.5.3p3. For > non-pointer, not-allocatable objects (this means "other"), the lower > bounds are supposed to be always zero." > > Hence, I now also set it for CFI_attribute_other to 0 – and check it in > a test case (most users there have NULL as base_addr, hence, only a > single assert is in that file). > > Build on x86-64_gnu-linux. > OK for the trunk and GCC-9? > > Tobias > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein