Re: Derived types with allocatable arrays; more problems
- From: Herman D. Knoble <SkipKnobleLESS@xxxxxxxxxxxxxxx>
- Date: Fri, 14 Apr 2006 07:57:57 -0400
This compiler abend is reproducable with Intel ifort v9.0.
Lahey LF95 V5.7f compilesand runs the example (with (/ /) instead
of [ ] notation.
Skip Knoble
On 14 Apr 2006 02:39:55 -0700, "Arno" <arnoinperu@xxxxxxxxxxx> wrote:
-|Dear all,
-|
-|Recently, I posted some problems with allocatable arrays of derived
-|types, but 'luckily' it was due to a bug in the Intel compiler. An
-|updated version of the compiler fixed that specific problem, but now I
-|have a similar piece of code still resulting in a sigsegv.
-|
-|Just to get things straight; I reckon that I can write
-|a = b,
-|where a and b are both allocatable arrays of the same type, both are
-|allocated to the same dimensions, and b is completely assigned some
-|values. If this is indeed the case, then I do not understand why the
-|code beneath crashes.
-|
-|Anyone some ideas?
-|
-|Thanks,
-|
-|Arno de Lange
-|
-|------------------------------------------------------------
-|
-|program main
-|
-|type b_obj
-| integer,allocatable :: c(:)
-|end type b_obj
-|
-|type a_obj
-| type (b_obj),allocatable :: b(:)
-|end type a_obj
-|
-|type (a_obj) :: a
-|type (b_obj),allocatable :: b(:)
-|integer,allocatable :: c(:)
-|integer :: i,n
-|
-|n = 3
-|
-|allocate(b(n),c(n))
-|do i=1,n
-| allocate(b(i)%c(n))
-|enddo
-|
-|c = [ (i,i=1,n) ]
-|
-|do i=1,n
-| b(i)%c = c
-|enddo
-|
-|allocate(a%b(n))
-|a%b = b
-|
-|end program main
.
- References:
- Prev by Date: Re: getting env. variables in gfortran...
- Next by Date: Re: Derived types with allocatable arrays; more problems
- Previous by thread: Re: Derived types with allocatable arrays; more problems
- Next by thread: Re: Derived types with allocatable arrays; more problems
- Index(es):
Relevant Pages
|