PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / cray_pointers_12.f90
blobf9d25a91d99cef0710cd3ec83f0c8674869d6244
1 ! { dg-do compile }
2 ! { dg-options "-fcray-pointer" }
4 ! Test the fix for PR36497 in which there was no error for the second
5 ! declaration of 'x'.
7 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
9 module test
10 integer(8) ipt
11 integer z(2), x
12 pointer (ipt, x)
13 end module
15 program bar
16 use test ! { dg-error "conflicts with symbol" }
17 integer x ! { dg-error "conflicts with symbol" }
18 ipt = loc(z(1))
19 x = 1
20 ipt = loc(z(2))
21 x = 3
22 if (any (z .ne. [1,3])) stop 1
23 end