Debian Codegraph @

gcc/testsuite/gfortran.dg/class_73.f90

raw
1 ! { dg-do compile }
2 ! Error recovery on invalid CLASS(), PARAMETER declarations
3 ! PR fortran/103137
4 ! PR fortran/103138
5 ! PR fortran/103693
6 ! PR fortran/105243
7 ! Contributed by G.Steinmetz
8
9 program p
10 type t
11 character(3) :: c = '(a)'
12 end type
13 class(t), parameter :: x = 1. ! { dg-error "PARAMETER attribute" }
14 class(*), parameter :: y = t() ! { dg-error "PARAMETER attribute" }
15 class(*), parameter :: z = 1 ! { dg-error "PARAMETER attribute" }
16 print x%c ! { dg-error "Syntax error" }
17 end