[2660] in Athena Bugs
hc2.1o double assignment failure
daemon@ATHENA.MIT.EDU (epeisach@ATHENA.MIT.EDU)
Fri Jul 28 09:28:09 1989
From: <epeisach@ATHENA.MIT.EDU>
Date: Fri, 28 Jul 89 09:27:46 -0400
To: bugs@ATHENA.MIT.EDU
A double assignment from a pointer fails under hc2.1o (what we are
currently running. This also appears to be broken in the copy of hc2.1r
that wdc has.
Ezra
Sample output:
achates% hc2 foo.c
achates% a.out
p (3,10) p1 (3,10) p2 (8191,-14004)
BTW: This is the problem with bitmaps on apa16's.
-----------------------------------------------------------------
#include <stdio.h>
typedef struct _DDXPoint {
short x, y;
} DDXPointRec;
main()
{
DDXPointRec point;
point.x = 3;
point.y = 10;
doit(&point);
}
doit(ppoint)
DDXPointRec *ppoint;
{
DDXPointRec point1, point2;
point2 = point1 = *ppoint;
printf("p (%d,%d) p1 (%d,%d) p2 (%d,%d)\n",
ppoint->x, ppoint->y,
point1.x, point1.y,
point2.x, point2.y);
}