1! { dg-do compile }
2! { dg-options "-fcray-pointer" }
3!
4! PR fortran/62174
5! Component declarations within derived types would overwrite the typespec of
6! variables with the same name who were Cray pointees.
7implicit none
8
9type t1
10  integer i
11end type t1
12type(t1) x
13
14pointer (x_ptr, x)
15
16type t2
17  real x ! should not overwrite x's type
18end type t2
19
20x%i = 0 ! should see no error here
21
22end
23