https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106035
--- Comment #10 from kargls at comcast dot net --- (In reply to Paul Thomas from comment #8) > Created attachment 61466 [details] > > As I wrote elsewhere, I should have checked if anybody else is working on > import. Apologies for treading on your toes. No need to apologies. As the audit trail indicates I got stuck and then ran into have too little time to actually work out how to handle import-list. > > The testcase that I have been using follows. > > Some important differences between our patches: > > 1) I have assumed <import == import, all> and <import :: import_list == > import, only :: import_list>. Does this need an interpretation request? My reading agrees with your interpretation above. From F2003, <import> made all host symbols available within an interface body. <import, all> seems to be just a more verbose way of spelling <import>. Until you mentioned it, I unconsciously assumed <import :: import_list> was the same as <import, only : import_list>. It seems that J3 is simply extending the <use, only : onyl_list>. Note, the use of only a single colon. The older former from F2003 must still be accepted for backwards compatibility. > > 2) I retained the original functioning of 'has_import_set' until such time > as f2018 import functions to my satisfaction. Your approach is better. > > 3) resolve.cc(check_import_status) is (possibly?) the wrong approach > compared with your checking of host association in symbol.cc. This is where I got stuck. <import, none> is easy as host association is simply blocked in symbol.cc. I was unable to come up with a way to implement <import, only : import_list>. My idea as to construct a linked list of symbol names within the current namespace, but that's as far as I got. > > 4) I think that my error messages are more helpful, if considerably less > concise. > > A merging of the best features from both might be in order. > Feel free to take or ignore anything from my WIP patch. One that you may want to carry over is the big comment above gfc_match_import with the EBNF of the various standards. Once you have something that you're happy with, feel free to ping me for a review.