aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Macleod <amacleod@redhat.com>2016-03-28 19:15:48 +0000
committerAndrew Macleod <amacleod@redhat.com>2016-03-28 19:15:48 +0000
commit5ff660219e1d55a49944d17d4f2957cc1025b4d7 (patch)
tree2b4761cabe86827e990861452c0ed559f54a72a9
parenta05bfa47e4bea48251d88c72d52917fe50092e7c (diff)
Bug fixes found last fall
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ttype-pro-trunk@234509 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c-family/c-common.c2
-rw-r--r--gcc/fold-const.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 74d5ba40d9e..a16c49ebaf0 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -9057,7 +9057,7 @@ handle_deprecated_decl_attribute (tree *node, tree ARG_UNUSED (name),
if (type && TYPE_NAME (type))
{
if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
- what = TYPE_NAME (*node);
+ what = TYPE_NAME (type);
else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_NAME (TYPE_NAME (type)))
what = DECL_NAME (TYPE_NAME (type));
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 247522b50e8..862f55f6240 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -7734,8 +7734,8 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
&& TREE_CODE (tem) == COND_EXPR
&& TREE_CODE (TREE_OPERAND (tem, 1)) == code
&& TREE_CODE (TREE_OPERAND (tem, 2)) == code
- && ! VOID_TYPE_P (TREE_OPERAND (tem, 1))
- && ! VOID_TYPE_P (TREE_OPERAND (tem, 2))
+ && ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 1)))
+ && ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 2)))
&& (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (tem, 1), 0))
== TREE_TYPE (TREE_OPERAND (TREE_OPERAND (tem, 2), 0)))
&& (! (INTEGRAL_TYPE_P (TREE_TYPE (tem))
@@ -13191,7 +13191,7 @@ tree_invalid_nonnegative_warnv_p (tree t, bool *strict_overflow_p, int depth)
/* If the initializer is non-void, then it's a normal expression
that will be assigned to the slot. */
- if (!VOID_TYPE_P (t))
+ if (!VOID_TYPE_P (TREE_TYPE (t)))
return RECURSE (t);
/* Otherwise, the initializer sets the slot in some way. One common