OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [class_38.f03] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

! { 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

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.