/* This file contains routines to construct GNU OpenMP constructs,
called from parsing in the C and C++ front ends.
- Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>,
Diego Novillo <dnovillo@redhat.com>.
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "tree.h"
-#include "function.h"
#include "c-common.h"
#include "toplev.h"
-#include "gimple.h"
-#include "bitmap.h"
+#include "gimple.h" /* For create_tmp_var_raw. */
#include "langhooks.h"
DECL_CONTEXT (var) = current_function_decl;
addr = build4 (TARGET_EXPR, TREE_TYPE (addr), var, addr, NULL, NULL);
}
- lhs = build_indirect_ref (loc, addr, NULL);
+ lhs = build_indirect_ref (loc, addr, RO_NULL);
/* There are lots of warnings, errors, and conversions that need to happen
in the course of interpreting a statement. Use the normal mechanisms
|| TREE_CODE (cond) == LE_EXPR
|| TREE_CODE (cond) == GT_EXPR
|| TREE_CODE (cond) == GE_EXPR
- || TREE_CODE (cond) == NE_EXPR)
+ || TREE_CODE (cond) == NE_EXPR
+ || TREE_CODE (cond) == EQ_EXPR)
{
tree op0 = TREE_OPERAND (cond, 0);
tree op1 = TREE_OPERAND (cond, 1);
cond_ok = true;
}
- if (TREE_CODE (cond) == NE_EXPR)
+ if (TREE_CODE (cond) == NE_EXPR
+ || TREE_CODE (cond) == EQ_EXPR)
{
if (!INTEGRAL_TYPE_P (TREE_TYPE (decl)))
cond_ok = false;
else if (operand_equal_p (TREE_OPERAND (cond, 1),
TYPE_MIN_VALUE (TREE_TYPE (decl)),
0))
- TREE_SET_CODE (cond, GT_EXPR);
+ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR
+ ? GT_EXPR : LE_EXPR);
else if (operand_equal_p (TREE_OPERAND (cond, 1),
TYPE_MAX_VALUE (TREE_TYPE (decl)),
0))
- TREE_SET_CODE (cond, LT_EXPR);
+ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR
+ ? LT_EXPR : GE_EXPR);
else
cond_ok = false;
}