Re: [Patch, Fortran] PR67125 - ALLOCATE with source-expr lbounds/ubound off by one

2018-10-16 Thread Tobias Burnus
Hi Paul, thanks for the review; committed as Rev. 265212. Using your check in gfc_array_allocate won't work as already early in gfc_trans_allocate everything is converted to a descriptor – likewise, checking "expr3" wouldn't work either. I was pondering whether to check it elsewhere in gfc_t

Re: [Patch, Fortran] PR67125 - ALLOCATE with source-expr lbounds/ubound off by one

2018-10-16 Thread Paul Richard Thomas
Hi Tobias, Your patch is OK for trunk and, I would suggest 8-branch. As a matter of curiosity, why did you not use the condition: if (!(expr3_desc && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (expr3_desc))) ? Your solution is fine, though. Cheers Paul On Fri, 12 Oct 2018 at 12:29, Tobias Burnus wrot

[Patch, Fortran] PR67125 - ALLOCATE with source-expr lbounds/ubound off by one

2018-10-12 Thread Tobias Burnus
Hello all, "When an ALLOCATE statement is executed for an array with no allocate-shape-spec-list, the bounds of source-expr determine the bounds of the array." (F2018, 9.7.1.2 (6)) That seems to work fine for arrays which have an array descriptor. However, as the current code shows, it fails fo