summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-11 14:56:39 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-11 14:56:39 +0000
commitb93508c0ab051d8b35dc1039bc9df575dbbbc9ce (patch)
tree86d760319c5f684bb65a7955d36c6b9540156771 /gcc/tree.h
parenteb4086077ed1095c11612536c3ab490b7516befb (diff)
downloadgcc-b93508c0ab051d8b35dc1039bc9df575dbbbc9ce.tar.gz
* tree.h (TREE_THIS_NOTRAP): Use TREE_CHECK5.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Only check TREE_THIS_NOTRAP when appropriate. (get_spill_slot_decl): Don't set TREE_THIS_NOTRAP on the new VAR_DECL. * gimplify.c (gimplify_expr): Copy NOTRAP from INDIRECT_REF to newly created MEM_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165313 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 330c8490973..8aedf1a9207 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -601,7 +601,7 @@ struct GTY(()) tree_common {
all types
TREE_THIS_NOTRAP in
- INDIRECT_REF, ARRAY_REF, ARRAY_RANGE_REF
+ INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, ARRAY_RANGE_REF
deprecated_flag:
@@ -1255,7 +1255,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
(or slice of the array) always belongs to the range of the array.
I.e. that the access will not trap, provided that the access to
the base to the array will not trap. */
-#define TREE_THIS_NOTRAP(NODE) ((NODE)->base.nothrow_flag)
+#define TREE_THIS_NOTRAP(NODE) \
+ (TREE_CHECK5 (NODE, INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, \
+ ARRAY_RANGE_REF)->base.nothrow_flag)
/* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
nonzero means it may not be the lhs of an assignment.
@@ -1296,8 +1298,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
In a BLOCK, this means that the block contains variables that are used. */
#define TREE_USED(NODE) ((NODE)->base.used_flag)
-/* In a FUNCTION_DECL, nonzero means a call to the function cannot throw
- an exception. In a CALL_EXPR, nonzero means the call cannot throw. */
+/* In a FUNCTION_DECL, nonzero means a call to the function cannot
+ throw an exception. In a CALL_EXPR, nonzero means the call cannot
+ throw. We can't easily check the node type here as the C++
+ frontend also uses this flag (for AGGR_INIT_EXPR). */
#define TREE_NOTHROW(NODE) ((NODE)->base.nothrow_flag)
/* In a CALL_EXPR, means that it's safe to use the target of the call