Hi all, the attached patch now handles -fcoarray=single and access to the local image like no coarray access, using the same check a before. Actually, I think we could remove the if (..coarray..) check completely: For 'single', it is like no coarrays; for 'lib' both AA[remote] =... and "AA = ... AA[remove]" will create a function call and uses already temporaries. I don't know what 'native'/'threads' does – but either it the image index is different, then no temporary is needed at all – or it is the same (in particular: this_image / not present), but then the noncoarray analysis would work. (Knowing that for i != this_image(), AA and AA[i] – or i /= j for AA[i] and AA[j] – we could further relax the checks, but I don't think that that's needed.) Hence: Is the patch OK for the trunk? Or should we completely get rid of if-conditional block? Tobias On 01.02.21 12:52, Tobias Burnus wrote: > On 01.02.21 08:42, Thomas Koenig via Fortran wrote: >>> I have a question with -Warray-temporaries in the test below. >>> With the AA coarray that warning appears in the first loop (on its >>> local part), >>> but not with the BB array with the same task, i.e. [...] >> It seems that dependency checking does not detect that no overlap >> can exist in that case, and so generates a temporary. Probably, >> dependency checking was not updated when coarrays were introduced. >> This is a missed optimization, not a correctness issue. > I have now filled https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98913 ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf