projects
/
gcc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
c-family: Fix up MEM_REF printing [PR95580]
[gcc.git]
/
gcc
/
c-family
/
c-pretty-print.c
diff --git
a/gcc/c-family/c-pretty-print.c
b/gcc/c-family/c-pretty-print.c
index 71baf5e2edeb2413b20c6688bcf4a8a7abeb18c5..ec0bafe10105ac43a647660d58d0d083ab97ddaa 100644
(file)
--- a/
gcc/c-family/c-pretty-print.c
+++ b/
gcc/c-family/c-pretty-print.c
@@
-1789,8
+1789,9
@@
c_pretty_printer::unary_expression (tree e)
if (!integer_zerop (TREE_OPERAND (e, 1)))
{
pp_c_left_paren (this);
if (!integer_zerop (TREE_OPERAND (e, 1)))
{
pp_c_left_paren (this);
- if (!integer_onep (TYPE_SIZE_UNIT
- (TREE_TYPE (TREE_TYPE (TREE_OPERAND (e, 0))))))
+ tree type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (e, 0)));
+ if (TYPE_SIZE_UNIT (type) == NULL_TREE
+ || !integer_onep (TYPE_SIZE_UNIT (type)))
pp_c_type_cast (this, ptr_type_node);
}
pp_c_cast_expression (this, TREE_OPERAND (e, 0));
pp_c_type_cast (this, ptr_type_node);
}
pp_c_cast_expression (this, TREE_OPERAND (e, 0));