2 ! PR 49755 - If allocating an already allocated array, and stat=
3 ! is given, set stat to non zero and do not touch the array.
5 integer, allocatable :: A(:, :)
11 ! Allocate of already allocated variable
12 allocate (A(5,5), stat=stat)
14 ! Expected: Error stat and previous allocation status
15 if (stat == 0) call abort ()
16 if (any (shape (A) /= [20, 20])) call abort ()
17 if (any (A /= 42)) call abort ()