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] PR18918 - UCOBOUND coarray draft patch


Daniel Kraft wrote:
On 04/03/11 17:03, Tobias Burnus wrote:
For the support, the scalarizer had to be modified and the cobounds had
to be saved in the descriptor (and in TYPE_LANG_SPECIFIC(node)).

I'm all but an expert on this area (maybe you could ask Mikael for his opinion on the scalarizer changes),

I am happy for any additional comment.


but isn't this TYPE_LANG_SPECIFIC stuff only for compile-time known things?

Yes and no. gfortran only uses array descriptors for deferred-shape and assumed-shape arrays ("A(:)") - for all other arrays (e.g. "A(4)", "A(n)") the bounds only live as "tree" in the the array's TYPE_LANG_SPECIFIC(node). If one needs them, e.g. to create an an array descriptor on in the scalarizer, one uses the such stored "tree" for assignment etc. Hence, the bounds are stored there - and live there only at compile time - but the they are used to materialize if needed.


@@ -4129,7 +4129,12 @@ gfc_is_coindexed (gfc_expr *e)
It seems to me there's some tab-vs-space issue here (for the int and for lines).

Indeed, a "tab" was missing in the "int" line.


@@ -3152,6 +3173,14 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
That doesn't change anything, but I'd rather have a "break" for the new cases (even though there was none before and fall-through just has the same effect). It seems clearer to me as you don't do anything "special" via fall-through.

Done.


@@ -3739,7 +3780,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
+ if (loopspec[n] != NULL /*|| n >= loop->dimen*/)


Or rather remove it and add later seems also like a good possibility to me.

Removed outcommented code.


@@ -7386,8 +7484,9 @@ gfc_walk_variable_expr (gfc_ss * ss, gfc_expr * expr)
+ newss->data.info.dim[newss->data.info.dimen+newss->data.info.codimen] = n;


Nit: Please add appropriate spacing around the "+" in the "long line". (As it is in the hunk above.)

Done - or actually: I also added a line break as the line was too long.


Committed as Rev. 171949.

Thanks for the review!

Tobias


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