This patch converts one more open coded construction of a
DEBUG_EXPR_DECL to a call of build_debug_expr_decl that I missed in my
previous patch befause it happens to be in the Fortran front-end.
gcc/fortran/ChangeLog:
2021-11-11 Martin Jambor <mjambor@suse.cz>
* trans-types.c (gfc_get_array_descr_info): Use build_debug_expr_decl
instead of building DEBUG_EXPR_DECL manually.
base_decl = GFC_TYPE_ARRAY_BASE_DECL (type, indirect);
if (!base_decl)
{
- base_decl = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (base_decl) = 1;
- TREE_TYPE (base_decl) = indirect ? build_pointer_type (ptype) : ptype;
- SET_DECL_MODE (base_decl, TYPE_MODE (TREE_TYPE (base_decl)));
+ base_decl = build_debug_expr_decl (indirect
+ ? build_pointer_type (ptype) : ptype);
GFC_TYPE_ARRAY_BASE_DECL (type, indirect) = base_decl;
}
info->base_decl = base_decl;