re PR c++/83996 (ICE with zero-sized array)
authorMarek Polacek <polacek@redhat.com>
Mon, 29 Jan 2018 20:54:12 +0000 (20:54 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 29 Jan 2018 20:54:12 +0000 (20:54 +0000)
commitb07c365100c92687361aa062ecf89c49650b8930
treedf91c991284a3ede8cc05d8cee9c0ec35c95ac76
parent7d07a93a52153e7ccda52ce86847d2e365dc9f83
re PR c++/83996 (ICE with zero-sized array)

PR c++/83996
* constexpr.c (cxx_fold_indirect_ref): Compute ((foo *)&fooarray)[1]
=> fooarray[1] in offset_int.

* g++.dg/ext/pr83996.C: New test.

From-SVN: r257160
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/pr83996.C [new file with mode: 0644]