I do not doubt at all that c_f_pointer(c_loc(p),q,[size(p)]) is perfectly legal (under some conditions). My questioning is about the “deallocabilty” of q afterwards.
Strangely the association will “work”, but q(2) won’t be associated to p(2). I can’t find in the standard any constraint on the contiguity ![]()