Re: Derived types with allocatable arrays; more problems



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

.



Relevant Pages

  • Re: equivalencing allocatable arrays
    ... extensions, such as allocatable arrays. ... present in your compiler. ... professional rather than a hobbiest situation, the cost of even the ... can be done with the particular extensions of some compiler. ...
    (comp.lang.fortran)
  • Re: equivalencing allocatable arrays
    ... extensions, such as allocatable arrays. ... present in your compiler. ... professional rather than a hobbiest situation, the cost of even the ... can be done with the particular extensions of some compiler. ...
    (comp.lang.fortran)
  • Re: Absoft f77 compiler error
    ... ALLOCATABLE arrays, for example, could be much larger. ... know of any compiler which supplies its own replacement for gnu binutils. ...
    (comp.lang.fortran)
  • Re: equivalencing allocatable arrays
    ... extensions, such as allocatable arrays. ... and you can start taking advantage of the other F9X features not ... present in your compiler. ... professional rather than a hobbiest situation, ...
    (comp.lang.fortran)
  • Re: Fortran 90 compiler on Mac
    ... >> I'm looking for a free Fortran 90 compiler for a PowerBook which works ... >> nice as Intel ifort for PC. ... > problem to the gfortran development team? ...
    (comp.lang.fortran)