The following little module causes an ICE.  I believe the bigger module
following it causes different ICE's, or perhaps more instances of the
same one.  But, things move around for me when I try to isolate
statements and I can't be sure.  My advice would be to fix this one 
and hope some magic happens to the other module.

Dick Hendrickson

      MODULE MODS

! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]


      INTEGER, PARAMETER, DIMENSION(10) ::  IP_ARRAY1_1_M =3

      INTEGER, PARAMETER, DIMENSION(10) ::  IP_ARRAY1_2_M =3

      INTEGER, PARAMETER, DIMENSION(10)  ::
     $   IP_ARRAY1_25_M = ISHFTC(3, IP_ARRAY1_2_M, 5)   !ICE

!     $   IP_ARRAY1_25_M = ISHFTC(IP_ARRAY1_1_M, 3, 5)   !  OK

      END MODULE MODS

gfortran%gfortran u_mods_ice.f
f951.exe: internal compiler error: in gfc_conv_array_initializer, at
fortran/tra
ns-array.c:3880
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

--------------------------
      MODULE MODS_big

! try this after you've fixed the two related problems.
! this is the full version of the parameters that spawned
! the smaller reports.  The ICE moved around and came and
! went as I tried to isolate things.  

! I believe there are two more ICEs in this set, but they're
! hard to isolate when things move around.

      INTEGER, PRIVATE, PARAMETER  ::
     $ np1 = 1, np2 = 2, NP6=6, NP7=7, NP8=8, NP9=9, NP10=10,
     $ MP6=-6, MP7=-7, MP8=-8, MP9=-9, MP10=-10, np5 = 5,
     $ mp1 = -1

      INTEGER, PARAMETER, DIMENSION(10) ::  IP_ARRAY1_1_M =
     $               (/1,2,3,4,5,6,7,8,9,10/)
      INTEGER, PARAMETER, DIMENSION(10) ::  IP_ARRAY1_2_M =
     $   (/(J1,J1=IP_ARRAY1_1_M(IP_ARRAY1_1_M(NP10)),NP1,MP1)/)

      INTEGER, DIMENSION(SIZE(IP_ARRAY1_1_M)/2) ::
     $     IP_ARRAY1_5_M = IP_ARRAY1_2_M(1:9:2)
      INTEGER, PARAMETER, DIMENSION(SIZE(IP_ARRAY1_1_M)/2) ::
     $     IP_ARRAY1_6_M = IP_ARRAY1_2_M(NP1:NP10:NP2)
      INTEGER, PARAMETER, DIMENSION(10)  ::
     $   IP_ARRAY1_10_M = MAX(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_11_M = MIN(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_12_M = ABS(IP_ARRAY1_1_M-IP_ARRAY1_2_M),
     $   IP_ARRAY1_15_M = ((((DIM(((IP_ARRAY1_1_M)),IP_ARRAY1_2_M))))),
     $   IP_ARRAY1_17_M = IAND(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_18_M = IBCLR(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_19_M = IBITS(IP_ARRAY1_1_M,IP_ARRAY1_2_M,
     $                            MAX(3,IP_ARRAY1_2_M(10:1:-1))),
     $   IP_ARRAY1_20_M(-MP10) = IBSET(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_21_M(NP2*NP5) = IEOR(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_22_M(NP10) = IOR(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_23_M(10) = INT(IP_ARRAY1_1_M),
     $   IP_ARRAY1_24_M = ISHFT(IP_ARRAY1_1_M,IP_ARRAY1_2_M),
     $   IP_ARRAY1_25_M = ISHFTC(IP_ARRAY1_1_M,IP_ARRAY1_2_M,
     $                                     MAX(5,IP_ARRAY1_2_M))


      END MODULE MODS_big


-- 
           Summary: internal compiler error for complicated PARAMETER
                    expressions
           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=35780

Reply via email to