[Bug fortran/19574] New: specification expression failure
coudert at clipper dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Sat Jan 22 11:49:00 GMT 2005
The following code (from
http://home.comcast.net/~kmbtib/gfortran_bugs/REF_JVB_GFTN_005.html) fails in
the following way (on i686-mingw and powerpc-apple-darwin):
---------------------------------
module funcs
implicit none
contains
function f(x)
character(*), intent(in) :: x
integer f(len(x))
integer i
! do i=1,len(x)
! f(i) = 0
! end do
end function f
end module funcs
program spec_expr_test
use funcs
implicit none
write(*,*) size(f('test'))
end program spec_expr_test
---------------------------------
$ gfortran reduced_spec.f90 && ./a.out
reduced_spec.f90: In function 'f':
reduced_spec.f90:4: warning: Function does not return a value
At line 19 of file reduced_spec.f90
Fortran runtime error: Internal: Possible double free of temporary.
If you uncomment the three lines in the code above, you get a runtime segfault
(on powerpc-apple-darwin):
$ gfortran reduced_spec.f90 && ./a.out
zsh: bus error ./a.out
I don't know if these two issues are related, but I post them both in one PR
just in case they can be debuggued altogether.
--
Summary: specification expression failure
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: coudert at clipper dot ens dot fr
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19574
More information about the Gcc-bugs
mailing list