2 ! { dg
-options
"-O3 -funconstrained-commons -fdump-tree-dom2-details" }
4 ! Test
for PR69368
: a single
-element array in a
common block
, which will be
5 ! overridden with a larger size at link time
(contrary
to language spec
).
6 ! Dominator opts considers accesses
to differently
-computed elements of X as
7 ! equivalent
, unless
-funconstrained
-commons is passed in
.
9 IMPLICIT DOUBLE PRECISION (X
)
11 COMMON /MYCOMMON
/ X
(1)
17 ! { dg
-final
{ scan
-tree
-dump
-not
"FIND" "dom2" } }
18 ! We should retain both a
read and
write of mycommon
.x
.
19 ! { dg
-final
{ scan
-tree
-dump
-times
" _\[0-9\]+ = mycommon\\.x\\\[_\[0-9\]+\\\];" 1 "dom2" } }
20 ! { dg
-final
{ scan
-tree
-dump
-times
" mycommon\\.x\\\[j?_\[0-9\]+\\\] = _\[0-9\]+;" 1 "dom2" } }