------- Comment #11 from sje at cup dot hp dot com  2006-04-07 22:36 -------
I think putting pad back to where it was is a good first step and I will see if
there is room on a 64 bit machine, I think we need some kind of test to make
sure that pad is always equal to or greater than the size of structure p and a
comment that changing the size of pad will affect compatibility.  I don't know
if we can do that check at GCC compile time though. 

I am now running into a related but slighty different problem on IA64 HP-UX. In
trans-io.c (gfc_build_st_parameter) we build the 'u' field as an array of char.
 Now in actual fact 'u' is the union of an array of char and the structure 'p'.
 On IA64 HP-UX (or any strict memory alignment machine) an array of char will
just be aligned on a 1-byte boundry, but the union would be aligned on a 4 or 8
byte boundry (whatever the largest field alignment requirement is).  So I am
accessing ->u.p.item_count and the alignment is wrong because the front-end
allocated the space based on char alignment not on int/struct alignment.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26890

Reply via email to