The following program causes an internal compiler error.  If the single
reference to NF3 in the MVBITS argument list is changed to "3" the program
compiles and executes.

Dick Hendrickson

      module yg0009_stuff

! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)

      type unseq
         integer I
      end type

      contains

      SUBROUTINE YG0009(TDA2L,NF4,NF3,NF1,MF1,MF4,MF3)
      TYPE(UNSEQ) TDA2L(4,3)

      CALL MVBITS (TDA2L(4:1:-1,1:3)%I,2,
     $   4, TDA2L(4:1:-1,1:NF3)%I, 3)

!  these also ICE, but seem needlessly complex
!      TYPE(UNSEQ) TDA2L(NF4,NF3)
!
!      CALL MVBITS (TDA2L(NF4:NF1:MF1,NF1:NF3)%I,2,
!     $   4, TDA2L(-MF4:-MF1:-NF1,-MF1:-MF3)%I, 3)
!  but, you might as well try them in your spare time ;)

      END SUBROUTINE

      end module yg0009_stuff

      program try_yg0009
      use yg0009_stuff
      type(unseq)  tda2l(4,3)

      call yg0009(tda2l,4,3,1,-1,-4,-3)

      end


C:\gfortran>gfortran try_yg0009.f
try_yg0009.f: In function 'yg0009':
try_yg0009.f:12: internal compiler error: in gfc_trans_allocate_array_storage,
a
t fortran/trans-array.c:558
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: Internal Compiler Error for MVBITS with derived type
                    argument that has run-time subscripts
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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

Reply via email to