]> gcc.gnu.org Git - gcc.git/commitdiff
(invert_truthvalue): Allow arbitrary BOOLEAN_TYPE arguments.
authorPer Bothner <bothner@gcc.gnu.org>
Sat, 18 Sep 1993 04:43:29 +0000 (21:43 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Sat, 18 Sep 1993 04:43:29 +0000 (21:43 -0700)
From-SVN: r5351

gcc/fold-const.c

index 4f0e8b89de3e3c40357fb837b88cec8626370fb6..62ead45de86dee8471298fb9f2e8cf6b6e13a628 100644 (file)
@@ -2181,12 +2181,14 @@ invert_truthvalue (arg)
                     invert_truthvalue (TREE_OPERAND (arg, 0)));
 
     case BIT_AND_EXPR:
-      if (! integer_onep (TREE_OPERAND (arg, 1)))
-       abort ();
+      if (!integer_onep (TREE_OPERAND (arg, 1)))
+       break;
       return build (EQ_EXPR, type, arg, convert (type, integer_zero_node));
-    }
 
-  abort ();
+    }
+  if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE)
+    abort();
+  return build1 (TRUTH_NOT_EXPR, type, arg);
 }
 
 /* Given a bit-wise operation CODE applied to ARG0 and ARG1, see if both
This page took 0.070292 seconds and 5 git commands to generate.