aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr95373_1.f90
blob: 59a9e7a81e08e206e6367a87fc6485cd9c3153c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-std=f95" }
! PR fortran/95373 - ICE in build_reference_type, at tree.c:7942

subroutine s (x)
  complex, parameter :: z = 3
  real(z% kind)      :: x       ! { dg-error "Fortran 2003: KIND part_ref" }
  type t
     real    :: kind
     logical :: re
  end type t
  type(t) :: b
  print *, b% kind, b% re
  print *, z% re                ! { dg-error "Fortran 2008: RE or IM part_ref" }
end