https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66833

            Bug ID: 66833
           Summary: [4.9/5.1/6.0]: ICE on assumed-rank character actual
                    argument to intrinsic functions
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org
  Target Milestone: ---

Invoking a rank, lbound, ubound, or c_loc with an assumed-rank character array
actual argument causes an ICE with gfortran 4.9.3, 5.1.0, or 6.0.0.  I wonder
if this is related to Bug 5733. 

$ cat opencoarrays.f90 
subroutine gfc_descriptor_c_char(a) 
  character a(..)
  print *,rank(a) ! ICE (also for lbound, ubound, and c_loc)
end subroutine

$ gfortran -c opencoarrays.f90 
opencoarrays.f90: In function 'gfc_descriptor_c_char':
opencoarrays.f90:3:0: internal compiler error: in gfc_conv_descriptor_dtype, at
fortran/trans-array.c:239
   print *,rank(a) ! ICE (also for lbound, ubound, and c_loc)
 ^

opencoarrays.f90:3:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6

$ gfortran --version
GNU Fortran (MacPorts gcc49 4.9.3_0) 4.9.3

Reply via email to