blob: 2793627924eb4513d5873f5a14af757a933edd2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
! { dg-do compile }
!
! PR 47728: [OOP] ICE on invalid CLASS declaration
!
! Contributed by Arjen Markus <arjen.markus@deltares.nl>
program test_objects
implicit none
type, abstract :: shape
end type
type, extends(shape) :: rectangle
real :: width, height
end type
class(shape), dimension(2) :: object ! { dg-error "must be dummy, allocatable or pointer" }
object(1) = rectangle( 1.0, 2.0 ) ! { dg-error "Unclassifiable statement" }
end program test_objects
|