lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_38.f03
blob2793627924eb4513d5873f5a14af757a933edd2d
1 ! { dg-do compile }
3 ! PR 47728: [OOP] ICE on invalid CLASS declaration
5 ! Contributed by Arjen Markus <arjen.markus@deltares.nl>
7 program test_objects
9    implicit none
11    type, abstract :: shape
12    end type
14    type, extends(shape) :: rectangle
15        real :: width, height
16    end type
18    class(shape), dimension(2) :: object  ! { dg-error "must be dummy, allocatable or pointer" }
20    object(1) = rectangle( 1.0, 2.0 )  ! { dg-error "Unclassifiable statement" }
22 end program test_objects