This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31215] New: ICE on valid code with gfortran


A recent gfortran ICEs on the following code:

module test1
   implicit none
   contains
      character(f(x)) function test2(x) result(r)
         implicit integer (x)
         dimension r(modulo(len(r)-1,3)+1)
         integer, intent(in) :: x
         interface
            pure function f(x)
               integer, intent(in) :: x
               integer f
            end function f
         end interface
         integer i

         do i = 1, len(r)
            r(:)(i:i) = achar(mod(i,32)+iachar('@'))
         end do
      end function test2
end module test1

program test
   use test1
   implicit none

   write(*,*) len(test2(10))
   write(*,*) test2(10)
end program test

pure function f(x)
   integer, intent(in) :: x
   integer f

   f = 2*x+1
end function f


-- 
           Summary: ICE on valid code with gfortran
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]