Skip to content
Snippets Groups Projects
Commit d6dbb71e authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

c-family: Fix up MEM_REF printing [PR95580]

The C FE in the MEM_REF printing ICEs if the type of the first argument
(which due to useless pointer conversions can be an arbitrary type) is a
pointer to an incomplete type.  The code just wants to avoid printing a cast
if it is a pointer to single byte elements.

2020-06-09  Jakub Jelinek  <jakub@redhat.com>

	PR c/95580
	* c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
	case when MEM_REF's first argument has type pointer to incomplete type.

	* gcc.dg/pr95580.c: New test.
parent 653ab081
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment