Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/realloc_on_assign_9.f90 @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do run } ! ! PR fortran/51869 ! module soop_stars_class implicit none type soop_stars real ,dimension(:,:) ,allocatable :: position end type type show type(soop_stars) :: rocket end type contains function new_show(boom) type(soop_stars) ,intent(in) :: boom type(show) :: new_show new_show%rocket = boom end function end module program main use soop_stars_class implicit none type(soop_stars) :: fireworks type(show), allocatable :: july4 allocate (fireworks%position(2,2)) fireworks%position = 33.0 july4 = new_show(boom=fireworks) end program