http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60126
Bug ID: 60126
Summary: Internal compiler error with code using pointer
reshaping (gfortran 4.8.2)
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mfvalin at gmail dot com
Created attachment 32087
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32087&action=edit
comsole output
problem orignally hit using gfortran 4.6.3
i then tried using 4.8.2 that failed also
the included simplified source code uses 2 ways to perform the operation, one
that
succesfully compiles, ans one that does not
done in 2 steps, it works
the single line version induces a compiler internal error
i attached the console output
hoping this helps
subroutine simple_bug_demo
implicit none
interface
function offset_ptr_R4(nelements) result (dest)
use ISO_C_BINDING
implicit none
real*4, pointer, dimension(:) :: dest
integer, intent(IN) :: nelements
end function offset_ptr_R4
end interface
real, dimension(:), pointer :: R1D
real, dimension(:,:), pointer :: R2D
real*4 :: R4
#if defined(NOBUG)
R1D = offset_ptr_R4(100)
R2D(-2:2,-3:3) => R1D
#else
R2D(-2:2,-3:3) => offset_ptr_R4(100)
#endif
stop
end