re PR c/82167 (Segmentation fault when dereferencing the address of an array argument)
authorMarek Polacek <polacek@redhat.com>
Wed, 13 Sep 2017 16:46:17 +0000 (16:46 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 13 Sep 2017 16:46:17 +0000 (16:46 +0000)
commit267bbb6fd17860dd09e69493ae031cc3e977301d
tree0b070c170988ef3ec4e6c0149971bd07f7d05be5
parent72ace300a2519fdd19617694dfc8c89dbfb96163
re PR c/82167 (Segmentation fault when dereferencing the address of an array argument)

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.

From-SVN: r252372
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr82167.c [new file with mode: 0644]