This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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/11354] error in evaluating variable length fortranstrings causes stalls


http://sourceware.org/bugzilla/show_bug.cgi?id=11354

--- Comment #5 from Stephan Kramer <stephan.kramer at imperial dot ac.uk> 2011-04-29 16:58:38 UTC ---
The below example actually reproduces the stalling behaviour by creating some
artificial memory contents. (compiled with gfortran 4.5.2, using gdb 4.2). Put
a breakpoint on line 14: print *, string

program main
implicit none
integer, parameter::n=10*1000*1000
character(len=11):: hello_world="hello_world"
! some filler for memory
character(len=3*n):: str

call print_string(hello_world)

! make sure the strings don't get optimized out:
hello_world(1:3)='bar'
str(1:3)='bar'


contains

subroutine print_string(string)
character(len=*):: string

print *, string

end subroutine print_string
end program main

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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