URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_basics_5.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }! This checks the correct functioning of derived types with the SAVE! attribute and allocatable components - PR31163!! Contributed by Salvatore Filippone <salvatore.filippone@uniroma2.it>!Module bar_modtype foo_typeinteger, allocatable :: mv(:)end type foo_typecontainssubroutine bar_foo_ab(info)integer, intent(out) :: infoType(foo_type), save :: f_aif (allocated(f_a%mv)) theninfo = size(f_a%mv)elseallocate(f_a%mv(10),stat=info)if (info /= 0) theninfo = -1endifend ifend subroutine bar_foo_abend module bar_modprogram tsaveuse bar_modinteger :: infocall bar_foo_ab(info)if (info .ne. 0) call abort ()call bar_foo_ab(info)if (info .ne. 10) call abort ()end program tsave! { dg-final { cleanup-modules "bar_mod" } }
