Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/class_dummy_4.f03 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do compile } ! ! PR 55037: [4.8 Regression] [OOP] ICE with local allocatable variable of abstract type ! ! Contributed by <mrestelli@gmail.com> module m1 implicit none type, abstract :: c_stv contains procedure, pass(x) :: source end type c_stv contains subroutine source(y,x) class(c_stv), intent(in) :: x class(c_stv), allocatable, intent(out) :: y end subroutine source end module m1 module m2 use m1, only : c_stv implicit none contains subroutine sub(u0) class(c_stv), intent(inout) :: u0 class(c_stv), allocatable :: tmp call u0%source(tmp) end subroutine sub end module m2 program p implicit none type :: c_stv end type class(c_stv), allocatable :: tmp call source(tmp) contains subroutine source(y) type(c_stv), allocatable, intent(out) :: y end subroutine end