aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2012-08-22 13:50:58 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2012-08-22 15:50:58 +0200
commit4579ccbc0e8bf33ee29ece3ff5294661215e9131 (patch)
treec9d1d486721745479ff3209d3aaac6129ba9c739
parent9bb06c2a9f8b83179cb76ba928b22aa3a2b57501 (diff)
downloadgcc-4579ccbc0e8bf33ee29ece3ff5294661215e9131.zip
gcc-4579ccbc0e8bf33ee29ece3ff5294661215e9131.tar.gz
gcc-4579ccbc0e8bf33ee29ece3ff5294661215e9131.tar.bz2
Make TREE_NOTHROW use the base.nothrow_flag again
While working on something else, I noticed that debug_tree (vec), when vec is a TREE_VEC was crashing because TREE_NOTHROW was asserting that its argument is not a TREE_VEC, so print_node would crash. It turned out that TREE_NOTHROW was accidentally modified by this change set: commit 87d8f7b67c6a36c37e48e298f26e693520099b1e Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Aug 21 10:03:38 2012 +0000 2012-08-21 Richard Guenther <rguenther@suse.de> cp/ * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor. (ATTR_IS_DEPENDENT): Likewise. (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of TREE_LANG_FLAG_0 on TREE_VECs. * tree.h (struct tree_base): Add union to make it possible to re-use the upper 4 bytes for tree codes that do not need as many flags as others. Move visited and default_def_flag to common bits section in exchange for saturating_flag and unsigned_flag. Add SSA name version and tree vec length fields here. (struct tree_vec): Remove length field here. (struct tree_ssa_name): Remove version field here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190558 138bc75d-0d04-0410-961f-82ee72b054a4 Richard Guenther pre-approved the reverting of the TREE_NOTHROW change line. Tested on x86_64-unknown-linux-gnu against master and applied to trunk. gcc/ * tree.h (TREE_NOTHROW): Use the base.nothrow_flag. From-SVN: r190595
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/tree.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 75cd34c..c9b0e0a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-22 Dodji Seketeli <dodji@redhat.com>
+
+ * tree.h (TREE_NOTHROW): Use the base.nothrow_flag.
+
2012-08-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46590
diff --git a/gcc/tree.h b/gcc/tree.h
index f332fdd..bca0576 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1305,7 +1305,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
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) (TREE_NOT_CHECK (NODE, TREE_VEC)->base.nothrow_flag)
+#define TREE_NOTHROW(NODE) ((NODE)->base.nothrow_flag)
/* In a CALL_EXPR, means that it's safe to use the target of the call
expansion as the return slot for a call that returns in memory. */