Change the order of length and offset code in startrw() -- always emit
authorDonn Seeley <donn@ucbvax.Berkeley.EDU>
Mon, 10 Mar 1986 09:20:37 +0000 (01:20 -0800)
committerDonn Seeley <donn@ucbvax.Berkeley.EDU>
Mon, 10 Mar 1986 09:20:37 +0000 (01:20 -0800)
the memoffset first, since it may define a temporary which is used in
the length expression.

SCCS-vsn: usr.bin/f77/pass1.vax/io.c 5.3

usr/src/usr.bin/f77/pass1.vax/io.c

index 2d1d481..416658c 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char *sccsid = "@(#)io.c        5.2 (Berkeley) %G%";
+static char *sccsid = "@(#)io.c        5.3 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -16,8 +16,13 @@ static       char *sccsid = "@(#)io.c        5.2 (Berkeley) %G%";
  *
  * University of Utah CS Dept modification history:
  *
  *
  * University of Utah CS Dept modification history:
  *
- * $Header: io.c,v 5.2 85/12/19 17:22:35 donn Exp $
+ * $Header: io.c,v 5.3 86/03/04 17:45:33 donn Exp $
  * $Log:       io.c,v $
  * $Log:       io.c,v $
+ * Revision 5.3  86/03/04  17:45:33  donn
+ * Change the order of length and offset code in startrw() -- always emit
+ * the memoffset first, since it may define a temporary which is used in
+ * the length expression.
+ * 
  * Revision 5.2  85/12/19  17:22:35  donn
  * Don't permit more than one 'positional iocontrol' parameter unless we
  * are doing a READ or a WRITE.
  * Revision 5.2  85/12/19  17:22:35  donn
  * Don't permit more than one 'positional iocontrol' parameter unless we
  * are doing a READ or a WRITE.
@@ -787,8 +792,9 @@ if(iostmt == IOREAD)
 if(intfile)
        {
        ioset(TYIOINT, XIRNUM, nump);
 if(intfile)
        {
        ioset(TYIOINT, XIRNUM, nump);
+       ioseta(XIUNIT, cpexpr(unitp));
        ioset(TYIOINT, XIRLEN, cpexpr(unitp->vleng) );
        ioset(TYIOINT, XIRLEN, cpexpr(unitp->vleng) );
-       ioseta(XIUNIT, unitp);
+       frexpr(unitp);
        }
 else
        ioset(TYIOINT, XUNIT, (expptr) unitp);
        }
 else
        ioset(TYIOINT, XUNIT, (expptr) unitp);