[Bug target/43808] [4.6 Regression] -fipa-reference -fschedule-insns -fstrict-aliasing causes two gfortran check failures

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 8 11:12:00 GMT 2010


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-08 11:11:56 UTC ---
Smaller testcase:

b.f90:

module pr43808
  type :: a
    integer, allocatable :: i(:)
  end type a
  type :: b
    type (a), allocatable :: at(:)
  end type b
contains
  subroutine foo(y)
    type(b) :: y(2)
    forall (j=1:2,k=1:4, y(1)%at(j)%i(k) .ne. y(2)%at(j)%i(k)) &
      y(1)%at(j)%i(k) = 999
  end subroutine foo
end module pr43808

c.f90:

  use pr43808
  type(a) :: x(2)
  type(b) :: y(2)
  x(1) = a((/1,2,3,4/))
  x(2) = a((/1,2,3,4/)+10)
  y(1) = b((/x(1),x(2)/))
  y(2) = b((/x(1),x(2)/))
  call foo(y)
end

./f951 -quiet -g b.f90; ./f951 -quiet -g -fipa-reference -fschedule-insns
-fno-schedule-insns2 -fstrict-aliasing -fverbose-asm c.f90; gfortran -o b{,.s}
c.s; ./b; echo $?
Segmentation fault (core dumped)
139



More information about the Gcc-bugs mailing list