aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-uninit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-uninit.c')
-rw-r--r--gcc/tree-ssa-uninit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index 7eddca3..c7f994b 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -401,6 +401,8 @@ maybe_warn_operand (ao_ref &ref, gimple *stmt, tree lhs, tree rhs,
The first_field() test is important for C++ where the predicate
alone isn't always sufficient. */
tree rhstype = TREE_TYPE (rhs);
+ if (POINTER_TYPE_P (rhstype))
+ rhstype = TREE_TYPE (rhstype);
if (TYPE_EMPTY_P (rhstype)
|| (RECORD_OR_UNION_TYPE_P (rhstype)
&& (!first_field (rhstype)