This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/29568] implement unformatted files with subrecords (Intel style)
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2006 22:12:49 -0000
- Subject: [Bug libfortran/29568] implement unformatted files with subrecords (Intel style)
- References: <bug-29568-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #28 from tkoenig at gcc dot gnu dot org 2006-11-29 22:12 -------
(In reply to comment #27)
Hi Jerry,
> The program fails on x86-64-freebsd and never completes the first write. It
> just keeps going, and going, and going .... This is a target specific issue.
> My guess is that it has to do with alignment or types. Maybe mixed type
> arithmetic, size_t vs gfc_offset. Is size_t 32 bits on freebsd and gfc_offset
> 64? I will attempt to change all new variables to gfc_offset and see if that
> fixes it.
Signedness could indeed be the problem.
If that doesn't solve the problem, could you print out the values of
- nbytes
- to_write_record
- to_write_subrecord
- dtp->u.p.current_unit->bytes_left
- dtp->u.p.current_unit->bytes_left_subrecord
at the start of the while loop in write_buf() (but please cast them
to long as appropriate :-)
This should help to see where things go wrong. Possibly, there
is an initialization problem in some other place.
Thomas
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29568