transfer of allocation status of zero sized tr18581 components on assignment
Alexei Matveev
alexei.matveev@gmail.com
Mon Dec 12 11:20:00 GMT 2011
On Mon, Dec 12, 2011 at 12:03 PM, Tobias Burnus <burnus@net-b.de> wrote:
> Well, you can do:
> * Use gfortran 4.4 (or later)
> * Backport the fix yourself and recompile GCC 4.3
> * Allocate an array of size 1 even if you only need one of size 0 - or
> create other workarounds
Thanks for quick reply.
I tried using user-defined assignment. It seems to work for
my case. Does it change any "semantics"?
#ifdef FPP_GFORTRAN_BUGS
interface assignment(=)
module procedure assign_sym_prod
end interface
public :: assignment(=)
#endif
...
#ifdef FPP_GFORTRAN_BUGS
subroutine assign_sym_prod(b, a)
!
! Gfortran 4.3 (Debian Lenny) has troubles with TR18581 assignment
! of zero sized components.
!
implicit none
type(sym_prod), intent(out) :: b
type(sym_prod), intent(in) :: a
! *** end of interface ***
call alloc_sym_prod(a%mult, b)
b%sub(:) = a%sub(:)
end subroutine assign_sym_prod
#endif
> I think it does not make sense for us to provide an update for 4.3, which is
> no longer officially supported. Additionally, even if we had a patch, Debian
> would also need to provide updated packages, which is unlikely for Debian
> oldstable. [Currently maintained GCC versions: 4.4.6, 4.5.3, 4.6.2 and the
> current developer version 4.7, which will be released around March 2012.]
All valid reasons. If only the sysadmins where less reluctant to
Debian upgrade ...
Alexei
More information about the Fortran
mailing list