Hi FX! On 4/9/24 09:32, FX Coudert wrote: > Hi Harald, > > Thanks for the patch. > > >> + if (attr.function) >> + { >> + gfc_error ("FPTR at %L to C_F_POINTER is a function returning a pointer", >> + &fptr->where); >> + return false; >> + } >> + >> if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, false, true)) >> return gfc_notify_std (GFC_STD_F2018, "Noninteroperable array FPTR " >> "at %L to C_F_POINTER: %s", &fptr->where, msg); > > > In both of these gfc_error(), could we change our error message to say "FPTR argument” instead of “FPTR”? “FPTR to C_F_POINTER” does not really make sense to me. > > This would be more in line with what the generally do: > >> Error: 'x' argument of 'sqrt' intrinsic at (1) must be REAL or COMPLEX > > So maybe “FPTR argument to C_F_POINTER at %L” ? That’s much more readable to me. Good point! I did indeed feel a little uncomfortable with the text and adjusted both messages accordingly to your suggestion. I also forgot to add one update of a pattern, and found a cornercase where the tightening of checks for C_F_POINTER was too strong. Corrected and now covered in an extension of the corresponding testcase. > Otherwise, OK. > > FX Thanks for the review! If there are no further comments, I will commit tomorrow. Thanks, Harald