utah rcsid 1.25 87/07/07 20:30:32: Permit the ZE code for INCR/DECR in
[unix-history] / usr / src / old / pcc / ccom.vax / local2.c
index a530be5..96dc187 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char *sccsid ="@(#)local2.c     1.26 (Berkeley) %G%";
+static char *sccsid ="@(#)local2.c     1.28 (Berkeley) %G%";
 # endif
 
 # include "pass2.h"
 # endif
 
 # include "pass2.h"
@@ -487,7 +487,7 @@ zzzcode( p, c ) register NODE *p; {
                putchar('\t');
 
        case 'E':       /* INCR and DECR, FOREFF */
                putchar('\t');
 
        case 'E':       /* INCR and DECR, FOREFF */
-               if (p->in.right->tn.lval == 1)
+               if (p->in.right->in.op == ICON && p->in.right->tn.lval == 1)
                        {
                        putstr( p->in.op == INCR ? "inc" : "dec" );
                        prtype(p->in.left);
                        {
                        putstr( p->in.op == INCR ? "inc" : "dec" );
                        prtype(p->in.left);
@@ -825,11 +825,11 @@ shumul( p ) register NODE *p; {
        extern int xdebug;
 
        if (xdebug) {
        extern int xdebug;
 
        if (xdebug) {
-                printf("\nshumul:op=%d,lop=%d,rop=%d", p->in.op, p->in.left->in.op, p->in.right->in.op);
-               printf(" prname=%s,plty=%d, prlval=%D\n", p->in.right->in.name, p->in.left->in.type, p->in.right->tn.lval);
+               int val;
+               printf("shumul:\n");
+               eprint(p, 0, &val, &val);
                }
 
                }
 
-
        o = p->in.op;
        if( o == NAME || (o == OREG && !R2TEST(p->tn.rval)) || o == ICON ) return( STARNM );
 
        o = p->in.op;
        if( o == NAME || (o == OREG && !R2TEST(p->tn.rval)) || o == ICON ) return( STARNM );