https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127120
--- Comment #1 from Steve Kargl <kargl at gcc dot gnu.org> ---
Forgot the details. ;-)
a = [1, 2, 3]
b = [4, 5, 6]
associate (tmp => (a)) ! Whoops. This should compile and execute
a = b ! without fitting a 'stop 3'
b = tmp
end associate
if (.not. (all(a == [4, 5, 6]) .and. all(b == [1, 2, 3]))) then
stop 3
end if
The expression '(a)' is treated as if it is simply the variable 'a'.
The expression should be evaluated, so 'tmp = [1,2,3]'. The
associate block is a complicated way to write a swapping of 'a'
and 'b'.