re PR c++/85033 (internal compiler error: in fold_offsetof_1, at c-family/c-common...
commitb01556f72abfae2c7644a0fb331fedacf7930ff2
authorMarek Polacek <polacek@redhat.com>
Fri, 23 Mar 2018 12:55:55 +0000 (23 12:55 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 23 Mar 2018 12:55:55 +0000 (23 12:55 +0000)
tree7162e67ea2e0acc3613588d51354efdf8536b358
parentf300628bfbc6ade69b9cfc8444da511506ac7940
re PR c++/85033 (internal compiler error: in fold_offsetof_1, at c-family/c-common.c:6269)

PR c++/85033
* semantics.c (finish_offsetof): Don't allow CONST_DECLs.

* g++.dg/ext/builtin-offsetof2.C: New test.

From-SVN: r258801
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/builtin-offsetof2.C [new file with mode: 0644]