gcc/testsuite/gfortran.dg/class_58.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR 68440: [OOP] ICE on declaring class variable with wrong attribute |
| 4 | ! |
| 5 | ! Contributed by Gerhard Steinmetz <[email protected]> |
| 6 | |
| 7 | subroutine s |
| 8 | type t |
| 9 | end type |
| 10 | class(t), parameter :: x = t() ! { dg-error "cannot have the PARAMETER attribute" } |
| 11 | class(t), parameter :: y = x ! { dg-error "cannot have the PARAMETER attribute" } |
| 12 | class(t) :: z = t() ! { dg-error "must be dummy, allocatable or pointer" } |
| 13 | end |