fold-const.c (make_range): Handle NULL operand 0 (like in BIND_EXPRs).
authorDoug Evans <dje@gnu.org>
Sat, 12 Oct 1996 04:06:11 +0000 (04:06 +0000)
committerDoug Evans <dje@gnu.org>
Sat, 12 Oct 1996 04:06:11 +0000 (04:06 +0000)
* fold-const.c (make_range): Handle NULL operand 0
(like in BIND_EXPRs).

From-SVN: r12957

gcc/fold-const.c

index 28f645673f052e7504ec9d55f1ff82e85c378166..d1c25c3039a1c9020659aae22f753b751d3f93ce 100644 (file)
@@ -2624,7 +2624,7 @@ make_range (exp, pin_p, plow, phigh)
     {
       code = TREE_CODE (exp);
       arg0 = TREE_OPERAND (exp, 0), arg1 = TREE_OPERAND (exp, 1);
-      if (tree_code_length[(int) code] > 0)
+      if (arg0 != 0 && tree_code_length[(int) code] > 0)
        type = TREE_TYPE (arg0);
 
       switch (code)