view gcc/testsuite/gfortran.dg/allocate_class_1.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 47085: [OOP] Problem in allocate( SOURCE=) for polymorphic component
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

 type :: t0
 end type
 class(t0) :: x  ! { dg-error "must be dummy, allocatable or pointer" }
 allocate(x)     ! { dg-error "is neither a data pointer nor an allocatable variable" }
 end