annotate gcc/testsuite/gfortran.dg/cray_pointers_11.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-fcray-pointer" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! PR fortran/62174
kono
parents:
diff changeset
5 ! Component declarations within derived types would overwrite the typespec of
kono
parents:
diff changeset
6 ! variables with the same name who were Cray pointees.
kono
parents:
diff changeset
7 implicit none
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 type t1
kono
parents:
diff changeset
10 integer i
kono
parents:
diff changeset
11 end type t1
kono
parents:
diff changeset
12 type(t1) x
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 pointer (x_ptr, x)
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 type t2
kono
parents:
diff changeset
17 real x ! should not overwrite x's type
kono
parents:
diff changeset
18 end type t2
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 x%i = 0 ! should see no error here
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 end