This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug fortran/11354] error in evaluating variable length fortranstrings causes stalls
- From: "stephan.kramer at imperial dot ac.uk"<sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 29 Apr 2011 16:58:52 +0000
- Subject: [Bug fortran/11354] error in evaluating variable length fortranstrings causes stalls
- Auto-submitted: auto-generated
- References: <bug-11354-4717@http.sourceware.org/bugzilla/>
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.