Test: mg_25_2

Higher SubleqErrorOutputSubleqITR
int a=0, b=1;

int f(int a)
{
   __out a;
   return 0;
}

void main()
{
   if( a && b ) __out 48;
   a=1;
   if( a && b ) __out 49;

   f(50) && f(51);
}


12

   top:top top sqmain

.  _a:0 _b:1

_f:
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; bp 0
   bp; sp bp
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t1 0
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t2 0
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t3 0

   t1; t2; bp t1; c1 t1; t1 t2
   t1; t3; ?+11; t2 Z; Z ?+4; Z; 0 t1; t1 t3
   t3 (-1)

   ax; c2 ax
   Z Z end_f

end_f:
   ?+8; sp ?+4; t3; 0 t3; inc sp
   ?+8; sp ?+4; t2; 0 t2; inc sp
   ?+8; sp ?+4; t1; 0 t1; inc sp
   sp; bp sp
   ?+8; sp ?+4; bp; 0 bp; inc sp
   ?+8; sp ?+4; ?+7; 0 ?+3; Z Z 0

_main:
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; bp 0
   bp; sp bp
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t1 0
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t2 0
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t3 0
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; t4 0

   t1; _a Z; Z t1 ?+3; Z Z ?+9; Z; _a t1; _a t1
   t2; Z t1 l1
   t3; _b Z; Z t3 ?+3; Z Z ?+9; Z; _b t3; _b t3
   Z t3 l1; inc t2;
l1:
   Z t2 l2
   c3 (-1)
l2:

   _a; dec Z; Z _a; Z

   t1; _a Z; Z t1 ?+3; Z Z ?+9; Z; _a t1; _a t1
   t2; Z t1 l3
   t3; _b Z; Z t3 ?+3; Z Z ?+9; Z; _b t3; _b t3
   Z t3 l3; inc t2;
l3:
   Z t2 l4
   c4 (-1)
l4:

   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+9; sp ?+5; c5 Z; Z 0; Z
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; ?+2 0 _f; . ?;
   t1; ax t1
   c1 sp
   t2; t1 Z; Z t2 ?+3; Z Z ?+9; Z; t1 t2; t1 t2
   t1; Z t2 l5
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+9; sp ?+5; c6 Z; Z 0; Z
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; ?+2 0 _f; . ?;
   t3; ax t3
   c1 sp
   t4; t3 Z; Z t4 ?+3; Z Z ?+9; Z; t3 t4; t3 t4
   Z t4 l5; inc t1;
l5:

   ?+8; sp ?+4; t4; 0 t4; inc sp
   ?+8; sp ?+4; t3; 0 t3; inc sp
   ?+8; sp ?+4; t2; 0 t2; inc sp
   ?+8; sp ?+4; t1; 0 t1; inc sp
   sp; bp sp
   ?+8; sp ?+4; bp; 0 bp; inc sp
   ?+8; sp ?+4; ?+7; 0 ?+3; Z Z 0

sqmain:
   dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
   ?+6; sp ?+2; ?+2 0 _main; . ?; inc sp

   Z Z (-1)

. c1:-2 c2:0 c3:48 c4:49 c5:50 c6:51

. t1:0 t2:0 t3:0 t4:0

. inc:-1 Z:0 dec:1 ax:0 bp:0 sp:-sp

Root (mg_25_2.hsq:17)
   Declaration (mg_25_2.hsq:1)
      Keyword [int] (mg_25_2.hsq:1)
      Declarator [=] (mg_25_2.hsq:1)
         Id [a] (mg_25_2.hsq:1)
         Const [0] (mg_25_2.hsq:1)
      Declarator [=] (mg_25_2.hsq:1)
         Id [b] (mg_25_2.hsq:1)
         Const [1] (mg_25_2.hsq:1)
   Function:0 [f] (mg_25_2.hsq:3)
      Keyword [int] (mg_25_2.hsq:3)
      Param-type-list (mg_25_2.hsq:3)
         Stackvar:-2 [a] (mg_25_2.hsq:3)
      Block (mg_25_2.hsq:4)
         OperatorIO [__out] (mg_25_2.hsq:5)
            Unary [*] (mg_25_2.hsq:5) a:3
               Additive [+] (mg_25_2.hsq:5) a:3
                  Variable [@bp] (mg_25_2.hsq:5) a:3
                  Const [-2] (mg_25_2.hsq:5) a:3
         Keyword-statement [return] (mg_25_2.hsq:6)
            Const [0] (mg_25_2.hsq:6)
   Function:0 [main] (mg_25_2.hsq:9)
      Keyword [void] (mg_25_2.hsq:9)
      Param-type-list (mg_25_2.hsq:9)
      Block (mg_25_2.hsq:10)
         Keyword-statement [if] (mg_25_2.hsq:11)
            Logical-And [&&] (mg_25_2.hsq:11)
               Equality [!=] (mg_25_2.hsq:11)
                  Variable [a] (mg_25_2.hsq:11) =:1
                  Const [0] (mg_25_2.hsq:11)
               Equality [!=] (mg_25_2.hsq:11)
                  Variable [b] (mg_25_2.hsq:11) =:1
                  Const [0] (mg_25_2.hsq:11)
            OperatorIO [__out] (mg_25_2.hsq:11)
               Const [48] (mg_25_2.hsq:11)
         Assignment [=] (mg_25_2.hsq:12)
            Variable [a] (mg_25_2.hsq:12) =:1
            Const [1] (mg_25_2.hsq:12)
         Keyword-statement [if] (mg_25_2.hsq:13)
            Logical-And [&&] (mg_25_2.hsq:13)
               Equality [!=] (mg_25_2.hsq:13)
                  Variable [a] (mg_25_2.hsq:13) =:1
                  Const [0] (mg_25_2.hsq:13)
               Equality [!=] (mg_25_2.hsq:13)
                  Variable [b] (mg_25_2.hsq:13) =:1
                  Const [0] (mg_25_2.hsq:13)
            OperatorIO [__out] (mg_25_2.hsq:13)
               Const [49] (mg_25_2.hsq:13)
         Logical-And [&&] (mg_25_2.hsq:15)
            Equality [!=] (mg_25_2.hsq:15)
               Postfix [(] (mg_25_2.hsq:15)
                  Label [f] (mg_25_2.hsq:15) f:3
                  Expression-list (mg_25_2.hsq:15)
                     Const [50] (mg_25_2.hsq:15)
               Const [0] (mg_25_2.hsq:15)
            Equality [!=] (mg_25_2.hsq:15)
               Postfix [(] (mg_25_2.hsq:15)
                  Label [f] (mg_25_2.hsq:15) f:3
                  Expression-list (mg_25_2.hsq:15)
                     Const [51] (mg_25_2.hsq:15)
               Const [0] (mg_25_2.hsq:15)