re PR debug/45015 (ICE in cselib.c caused by fix for PR43051)
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_typespec.f90
blob686abdb5b1bb0315a89ca0e5a369c6e64129ae07
2 ! { dg-do compile }
4 ! PR fortran/44929
6 ! The module is contributed by Satish.BD <bdsatish@gmail.com>.
7 ! The subroutines are from Tobias Burnus and Steve Kargl.
9 module temp
11 type, abstract :: abst
12 !! empty
13 end type abst
15 type, extends(abst) :: real_type
16 !! empty
17 end type real_type
19 contains
21 function create(name) result(obj)
22 character(len=*), intent(in) :: name
23 class(abst), pointer :: obj
24 allocate(real_type :: obj)
25 end function create
26 end module temp
28 subroutine z
29 real(8), allocatable :: r8
30 allocate(real(kind=8) :: r8)
31 end subroutine z
33 subroutine y
34 real(8), allocatable :: r8
35 allocate(real(8) :: r8)
36 end subroutine y
37 ! { dg-final { cleanup-modules "temp" } }