re PR c++/38699 (ICE using offsetof with pointer and array accesses)
authorDodji Seketeli <dodji@redhat.com>
Tue, 3 Nov 2009 10:44:36 +0000 (10:44 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Tue, 3 Nov 2009 10:44:36 +0000 (11:44 +0100)
commit61c3c49040b532d94e2371b0049447561ee00319
treec87dd211761661c2a4d2e74640e5d6de9bb6613b
parent9d1a984546a59678be0a5196a87e649f5551dcc7
re PR c++/38699 (ICE using offsetof with pointer and array accesses)

Fix PR c++/38699

gcc/ChangeLog:

PR c++/38699
* c-common.c (fold_offsetof_1): Issue errors when the
member designator of the offsetoff expression is not legitimate.

gcc/testsuite/ChangeLog:

* c-c++-common/dfp/builtin-offsetof.c: New test.
* g++.dg/other/offsetof6.C: Likewise.

From-SVN: r153843
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/dfp/builtin-offsetof.c [new file with mode: 0644]
gcc/testsuite/g++.dg/other/offsetof6.C [new file with mode: 0644]