On Thu, Jan 07, 2021 at 02:29:50PM -0700, Martin Sebor via Gcc-patches wrote: > --- a/gcc/c-family/c-pretty-print.c > +++ b/gcc/c-family/c-pretty-print.c > @@ -1844,22 +1844,25 @@ print_mem_ref (c_pretty_printer *pp, tree e) > } > } > > - const tree access_type = TREE_TYPE (e); > + tree access_type = TREE_TYPE (e); > + if (TREE_CODE (access_type) == ARRAY_TYPE) > + access_type = TREE_TYPE (access_type); > tree arg_type = TREE_TYPE (TREE_TYPE (arg)); > if (TREE_CODE (arg_type) == ARRAY_TYPE) > arg_type = TREE_TYPE (arg_type);
The array types can be multidimensional, are you sure you don't want to use strip_array_types instead? Jakub