This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24557] New: ICE: PRINTing function result of size depending on assumed length CHARACTER dummy
- From: "eedelman at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2005 11:16:10 -0000
- Subject: [Bug fortran/24557] New: ICE: PRINTing function result of size depending on assumed length CHARACTER dummy
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
kl-nrb:~$ cat buggy.f90
program main
implicit none
character(4) :: a(2)
print *,fun(a)
contains
function fun(arg)
character(len=*), intent(in) :: arg(:)
integer :: fun(size(arg))
fun = 5
end function fun
end pkl-nrb:~$ gfortran41 buggy.f90
buggy.f90:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
If I change the length of 'arg' to a constant it works, and if I assign the
function result to a temporary variable before I print, it also works.
--
Summary: ICE: PRINTing function result of size depending on
assumed length CHARACTER dummy
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eedelman at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24557