Internal compiler error when using ASSOCIATE

Internal compiler error when using ASSOCIATE

Using ifort12.0.1.107 I get a internal compiler error when trying to compile:----------------------------
program testimplicit nonetype :: block_t integer,allocatable :: arr(:)end type block_ttype(block_t) :: blocks(2) associate(b=>blocks(1)) end associate end program test----------------------------The error occurs when I use the "-O0" or "-debug" options, but does not occur if I use "-O1","-O2", or "-O3".I have notice that this error does not occur if:(a) the array inside block_t is explicit (e.g. replace "integer,allocatable :: arr(:)" with "integer:: arr(-1:1)")(b) the same ASSOCIATE block is used inside a subroutine (see below for example)Another problem I have encountered with ASSOCIATE is illustrated by:----------------------------program testimplicit nonetype :: block_tinteger,allocatable :: arr_alloc(:)integer :: arr_expli(-1:1)end type block_ttype(block_t) :: blocks(2)call getbounds(blocks)containssubroutine getbounds(block)implicit none type(block_t),intent(in) :: block(2) allocate(block(1)%arr_alloc(-1:1)) associate(arr_alloc_assoc=>block(1)%arr_alloc) write(*,*) lbound(arr_alloc_assoc), lbound(block(1)%arr_expli) end associate associate(arr_expli_assoc=>block(1)%arr_expli) write(*,*) lbound(arr_expli_assoc), lbound(block(1)%arr_expli) end associate end subroutine getboundsend program test----------------------------output is:-1 -11 -1----------------------------It seems that the bounds "arr_expli_assoc" are incorrect. I believe this is a compiler problem since the ASSOCIATE documentation says, "The lower bound of each dimension is the result of the intrinsic function LBOUND applied to the corresponding dimension of selector."http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/fortran/win/lref_for/source_files/statement_associate.htm?wapkw=(ASSOCIATE)
Thanks,
Sebastian

publicaciones de 6 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Thank you for reporting both errors, Sebastian. The internal error actually only occurs with -O0. -g implies -O0.

I submitted both to Development (internal tracking ids noted below) and will keep the thread updated as I learn more.

(Internal tracking id: DPD200163880 - internal compiler error)
(Internal tracking id: DPD200163881 - associate/lower bound)

(Resolution Update on 02/21/2011): Defect DPD200163880 is fixed in the Intel Fortran Composer XE 2011 Update 2 (2011.2.137 - Linux)

(Resolution Update on 04/27/2011): Defect DPD200163881 is fixed in the Intel Fortran Composer XE 2011 Update 3 (2011.3.174 - Linux)

Defect DPD200163880 is fixed in the Intel Fortran Composer XE 2011 Update 2 (2011.2.137 - Linux).

Defect DPD200163881 is expected to be fixed in the Intel Fortran Composer XE 2011 Update 3 due out late next month.

Hi,I noticed thatDPD200163881 in the l_fcompxe_2011.6.233 'Fixes List' (http://software.intel.com/en-us/articles/intel-composer-xe-2011-compilers-fixes-list/). I tried to run similar test as in the original post (part b):

program test

implicit none

type :: block_t
  integer,allocatable :: arr_alloc(:)
  integer :: arr_expli(-1:1)
end type block_t

  type(block_t) :: blocks(2)

  call getbounds(blocks)

  contains

  subroutine getbounds(block)
  implicit none
    type(block_t),intent(inout) :: block(2)

    allocate(block(1)%arr_alloc(-1:1))

    associate(arr_alloc_assoc=>block(1)%arr_alloc)
      write(*,*) lbound(arr_alloc_assoc), lbound(block(1)%arr_alloc)
    end associate

    associate(arr_expli_assoc=>block(1)%arr_expli)
      write(*,*) lbound(arr_expli_assoc), lbound(block(1)%arr_expli)
    end associate

  end subroutine getbounds

end program test

with output:-1 -11 -1The lower bound for the associated array 'arr_expli_assoc' on line 26 still seems to be incorrect. I am using the latest version of the Composer XE2011Fortran compiler (Update 6).Thanks,Sebastian

Thank you for your post regarding this earlier reported issue, Sebastian. I confirmed your findings and reopened defect DPD200163881. I will update this thread after I learn more.

(Resolution Update on 10/14/2012): This defect is fixed in the Intel® Fortran Composer XE 2013 Initial Release (2013.0.0.079 - Linux)

The additional defect noted in the similar test posted by sliska314 is fixed in the Intel® Fortran Composer XE 2013 Initial Release (2013.0.0.079 - Linux)

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya