Hi all, This is a simple patch to correct the comment for ADDR_EXPR tree code.
The resulting expression of ADDR_EXPR is a tree with POINTER_TYPE. So the result mode should ptr_mode instead of Pmode. As far as I understand, Pmode is the addressing mode. But not the mode to represent a pointer (or address?). Okay to commit? Regards, Renlin gcc/ChangeLog: 2018-03-23 Renlin Li <renlin...@arm.com> * tree.def (ADDR_EXPR): Correct the commnet.
diff --git a/gcc/tree.def b/gcc/tree.def index 31de6c0994de43c175b924d4ba578a131fb4d524..1e5aca811f801c54be9215a9d86028f50a4ec608 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -870,7 +870,7 @@ DEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", tcc_expression, 1) DEFTREECODE (SAVE_EXPR, "save_expr", tcc_expression, 1) /* & in C. Value is the address at which the operand's value resides. - Operand may have any mode. Result mode is Pmode. */ + Operand may have any mode. Result mode is ptr_mode. */ DEFTREECODE (ADDR_EXPR, "addr_expr", tcc_expression, 1) /* Operand0 is a function constant; result is part N of a function