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/67938] ICE on using assumed rank character with some intrinsics


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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
$ cat z1.f90
program p
   implicit none
   character(1) :: z(3)
   call s(z)
contains
   subroutine s(x)
      character(1) :: x(..)
      print *, lbound(x)
      print *, ubound(x)
   end subroutine
end

$ gfortran z1.f90
z1.f90:8:0:

       print *, lbound(x)
 1
internal compiler error: in gfc_conv_descriptor_dtype, at
fortran/trans-array.c:251

---

$ cat z1s.f90
program p
   implicit none
   character(77) :: z(33)
   call s(z)
contains
   subroutine s(x)
      character(77) :: x(..)
      print *, size(x)
   end subroutine
end

$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1s.f90
$ a.out
           0


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