This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SIMPLE NOT expressions


While writing code for the Fortran 95 GCC frontent, I ran into some problems 
with TRUTH_NOT_EXPR.  These expressions make is_simple_unary_expr() return 
false.

For some reason TRUTH_NOT_EXPR is class 'e', not class '1'.  The patch below 
fixes the problem by adding an extra check.

Paul Brook

-----------8<------------
--- tree-simple.c	2002-07-18 12:08:04.000000000 +0100
+++ /home/paul/cases/gcc/gcc/tree-simple.c	2002-07-17 15:20:03.000000000 +0100
@@ -628,6 +628,10 @@
       && is_simple_val (TREE_OPERAND (t, 0)))
     return 1;
 
+  if (TREE_CODE (t) == TRUTH_NOT_EXPR
+      && is_simple_val (TREE_OPERAND (t, 0)))
+    return 1;
+
   if (is_simple_cast (t))
     return 1;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]