gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / cray_pointers_11.f90
blobd847676d82c3b68395c12850c74e17ad795e478f
1 ! { dg-do compile }
2 ! { dg-options "-fcray-pointer" }
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.
7 implicit none
9 type t1
10 integer i
11 end type t1
12 type(t1) x
14 pointer (x_ptr, x)
16 type t2
17 real x ! should not overwrite x's type
18 end type t2
20 x%i = 0 ! should see no error here
22 end