https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140

--- Comment #27 from anlauf at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #25)
> Created attachment 64189 [details]
> Regression free patch to fix the wrinkles
> 
> It has become more and more elaborate but fixes all the wrinkles and more
> besides.
> 
> Are there any more conditions that should applied before the dependency
> check is done?
> 
> Should I be worried about aliasing rules?
> 
> Cheers
> 
> Paul

Just looked at this patch.

The testcase extension has obvious typos:

+    ! l.h.s. vector indices, r.h.s. array section as a function arg.
+    p1%i = q1%i
+    p1([2,1]) = f1 (p1([2,1]))
+    call check (p2%i, expect3, 75)
                 ^^p1 <- !!!

+    p1%i = q1%i
+    call sub1 (p1([2,1]), f1 (p1([2,1])))
+    call check (p2%i, expect3, 76)

Same.

I'd change the constant in f1 to something different from 23.
(I just took 100 now).  This needs updating expect3 (for this choice):

  expect3 = [124,125,3,4]

Then your two additional tests work here with ifx, patched gfc (of course!),
and NAG, Nvidia, and AMD flang.

Reply via email to