[Bug fortran/49110] Deferred-length character result triggers (false positive) error for pure procedures
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 22 19:25:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49110
--- Comment #9 from kargl at gcc dot gnu.org 2011-05-22 19:00:06 UTC ---
Note the routine need not be pure to invoke the segfault. Here's
an even shorter test case.
program foo
implicit none
character s(5)
s = ['a', 'b', 'c', 'd', 'e']
print *, bar(s)
contains
function bar(s) result(a)
! character, intent(in) :: s(5) ! Compiles and runs
character, intent(in) :: s(:) ! Compiles and segfaults
character(len=:), allocatable :: a
a = repeat('a', size(s))
end function bar
end program foo
More information about the Gcc-bugs
mailing list