http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46339

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE
            Summary|[4.3/4.4/4.5/4.6            |ICE (segfault) in
                   |Regression] ICE (segfault)  |gfc_trans_pointer_assignmen
                   |in                          |t
                   |gfc_trans_pointer_assignmen |
                   |t                           |

--- Comment #27 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-25 
19:48:03 UTC ---
This bug is not really a regression and is the same bug as 34640. Though we can
get rid of the ICE we still will get wrong code:

Here is a little different test case which compiles with patches above but
gives wring results.

module test
  implicit none
  type b
    integer(kind=2) :: j
    character(kind=1, len=52) :: c
    real(kind=16) :: x
  end type b
  type a
    type(b), dimension(4) :: i
  end type a
contains
  subroutine test_sub(sorb,ipn)
    type(a), intent(in), target :: sorb
    integer(kind=2), dimension(:), pointer :: ipn
    ipn=>sorb%i(2:4)%j
    print *, ipn
  end subroutine test_sub
end module test

program main
  use test
  implicit none
  integer :: stride, ub, lb, span, str
  type(a), target :: myA
  integer(kind=2), dimension(:), pointer :: ptr
  myA%i(1:4)%j = (/ 1, 3, 5, 7 /)
  myA%i(1:4)%c = (/ 'a', 'b', 'c', 'd' /)
  call test_sub(myA,ptr)
  print *, ptr
end program main

*** This bug has been marked as a duplicate of bug 34640 ***

Reply via email to