On 09/13/2017 05:00 AM, Marek Polacek wrote:
> This fixes a segv, where -Wsizeof-array-argument crashed because
> expr.original_type was null. It was null because for sizeof (*&a)
> we go to c_parser_unary_expression's case CPP_AND: and case CPP_MULT:,
> and that removes the original_type. But we don't need the original
> type, we can just use TREE_TYPE of expr.value.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2017-09-13 Marek Polacek <pola...@redhat.com>
>
> PR c/82167
> * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
> than expr.original_type.
>
> * gcc.dg/pr82167.c: New test.
OK.
jeff