aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_73.f90
blob: c11ee38c086dc4456d3e8908ed66c935b615a5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! Error recovery on invalid CLASS(), PARAMETER declarations
! PR fortran/103137
! PR fortran/103138
! PR fortran/103693
! PR fortran/105243
! Contributed by G.Steinmetz

program p
  type t
     character(3) :: c = '(a)'
  end type
  class(t), parameter :: x = 1.  ! { dg-error "PARAMETER attribute" }
  class(*), parameter :: y = t() ! { dg-error "PARAMETER attribute" }
  class(*), parameter :: z = 1   ! { dg-error "PARAMETER attribute" }
  print x%c                      ! { dg-error "Syntax error" }
end