view 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
line wrap: on
line source

! { dg-do compile }
! { dg-options "-fcray-pointer" }
!
! PR fortran/62174
! Component declarations within derived types would overwrite the typespec of
! variables with the same name who were Cray pointees.
implicit none

type t1
  integer i
end type t1
type(t1) x

pointer (x_ptr, x)

type t2
  real x ! should not overwrite x's type
end type t2

x%i = 0 ! should see no error here

end