OSDN Git Service

2010-10-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / alloc_comp_constraint_6.f90
1 ! { dg-do compile )
2 ! PR45889 Regression with I/O of element of allocatable array in derived type 
3 module cell
4   implicit none
5   private 
6   type, public:: unit_cell
7      integer                                             ::num_species
8      character(len=8), dimension(:),          allocatable::species_symbol
9   end type unit_cell
10   type(unit_cell),                            public, save::current_cell 
11   contains
12   subroutine cell_output
13     implicit none
14     integer::i
15     do i=1,current_cell%num_species
16        write(*,*)(current_cell%species_symbol(i))
17     end do
18     return
19   end subroutine cell_output
20 end module cell
21 ! { dg-final { cleanup-modules "cell" } }