Paul, Either resolve.cc has sufficiently evolved since you submitted your patch or the patch is somehow mangled. When I apply it to my tree for resolve.cc, I see
Hunk #1 succeeded at 3919. Hunk #2 succeeded at 4223. Hunk #3 succeeded at 7940 (offset -28 lines). Hunk #4 succeeded at 8068 (offset -28 lines). Hunk #5 succeeded at 10752 (offset 17 lines). Hunk #6 succeeded at 11299 with fuzz 2 (offset 276 lines). Hmm... The next patch looks like a unified diff to me... Hunk #5 puts + gfc_code *old_code = code; into resolve_select_type(). while Hunk #6 puts this piece of code in resolve_select_rank() + /* Check the symbol itself. */ + + if (gfc_current_ns->import_state != IMPORT_NOT_SET + && (c->ts.type == BT_DERIVED || c->ts.type == BT_CLASS)) + { + st = gfc_find_symtree (gfc_current_ns->sym_root, + c->ts.u.derived->name); + if (!check_sym_import_status (c->ts.u.derived, st, NULL, old_code, + gfc_current_ns)) + error++; + } Based on the error++ line, I've moved the code up into resolve_select_type() where I believe it belongs. -- steve On Mon, Jun 23, 2025 at 05:43:31PM +0100, Paul Richard Thomas wrote: > Hello All, > > I was mulling over the F2018 status of gfortran, when I came across the > additions to the IMPORT statement. This seemed like such a useful addition > to fortran that I set about an implementation; thinking that this would be > low hanging fruit. Parsing and checking the constraints C897-8100 turned > out to be straightforward. C8101 was already implemented for F2008 IMPORT. > C8102 required a lot more work! (Please see the patch for the constraints.) > > Steve K got in touch, when he found out that we had been working in > parallel on the new IMPORT features. Thus encouraged by our exchanges, I > ground on until the patch reached its present state. I think that the > ChangeLog is clear enough, even if the patch came out a bit long winded. > > Of the existing IMPORT tests, only import3.f90 needed modification by > setting -std=f2008 because of the change in the wording of the error > messages. The new test, import12.f90, is complete IMHO but I am open to > suggestions for additions. I cannot return to working on this until the > second week of July so you have plenty of time to test and comment. > > Regtests fine with x86_64 on FC42. OK for mainline? > > Paul