OSDN Git Service

(invert_truthvalue): Allow arbitrary BOOLEAN_TYPE arguments.
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Sep 1993 04:43:29 +0000 (04:43 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Sep 1993 04:43:29 +0000 (04:43 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5351 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fold-const.c

index 4f0e8b8..62ead45 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