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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [realloc_on_assign_9.f90] - Blame information for rev 749

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/51869
4
!
5
module soop_stars_class
6
  implicit none
7
  type soop_stars
8
    real ,dimension(:,:) ,allocatable :: position
9
  end type
10
  type show
11
    type(soop_stars) :: rocket
12
  end type
13
contains
14
  function new_show(boom)
15
    type(soop_stars) ,intent(in) :: boom
16
    type(show) :: new_show
17
    new_show%rocket = boom
18
  end function
19
end module
20
 
21
program main
22
  use soop_stars_class
23
  implicit none
24
 
25
  type(soop_stars) :: fireworks
26
  type(show), allocatable :: july4
27
 
28
  allocate (fireworks%position(2,2))
29
  fireworks%position = 33.0
30
 
31
  july4 = new_show(boom=fireworks)
32
end program
33
 
34
! { dg-final { cleanup-modules "soop_stars_class" } }

powered by: WebSVN 2.1.0

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