------- 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

Reply via email to