This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/26890] SIZE parameter interacts with same variable in IO list character length specification.
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Apr 2006 22:23:04 -0000
- Subject: [Bug libfortran/26890] SIZE parameter interacts with same variable in IO list character length specification.
- References: <bug-26890-10374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2006-04-07 22:23 -------
I put some prints at the top of get_unit in unit.c to take a look. After
putting the padding back where it was originally in io.h:
The DTP
Size of p: 132
Size of pad: 200
Size of char *: 4
Size if int: 4
This is OK on i686. pad needs to be >= p
The original padding in io.h should be:
char pad[16 * sizeof (char *) + 34 * sizeof (int)];
Steve Ellcey, could you check this on a 64 bit machine, HPUX. I used the
following with a simple program that performed a WRITE.
gfc_unit *
get_unit (st_parameter_dt *dtp, int do_create)
{
st_printf("The DTP\n");
st_printf("Size of p: %d\n", sizeof(dtp->u.p));
st_printf("Size of pad: %d\n", sizeof(dtp->u.pad));
st_printf("Size of char *: %d\n", sizeof(char *));
st_printf("Size if int: %d\n", sizeof(int));
...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26890