This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
$ cat test.f90 program no_leak
real, dimension(100) :: x, y
y(:size(compact(x))) = compact(x)**2
contains
function compact(x)
real,allocatable,dimension(:) :: compact
real,dimension(:),intent(in) :: x
integer :: n
allocate(compact(n))
end function compact
end
$ test.f90 gfortran test.f90
In file test.f90:6
real,allocatable,dimension(:) :: compact 1 Error: ALLOCATABLE attribute conflicts with FUNCTION attribute at (1)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |