Dear All, I had already posted a patch for the above, which sets the offset correctly in the caller to gfc_conv_expr_descriptor. However, I was so concerned that the latter was not doing the job properly that I decided to investigate further. The result was that I found a completely trivial omission in the condition for the calculation of 'base', which meant that the wrong branch was taken and the offset incorrectly calculated.
Committed as 'obvious' (well... it took a while but is obvious now I see it!) in revision 232200. Thanks for the report, Arjen. Paul