]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/ChangeLog
re PR c++/85061 (ICE with __builtin_offsetof applied to static member)
authorJakub Jelinek <jakub@redhat.com>
Tue, 27 Mar 2018 19:59:30 +0000 (21:59 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 27 Mar 2018 19:59:30 +0000 (21:59 +0200)
commita7dea61705009a47b788ecafed0816ab8b54e3ac
treee568e6d24afab9b357d90af7039d5096786da049
parentdc442cef60468a813ab2abee691280089a5e5b7f
re PR c++/85061 (ICE with __builtin_offsetof applied to static member)

PR c++/85061
* c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
get_base_address of the second operand is a VAR_P, rather than the
operand itself, and use gcc_checking_assert instead of gcc_assert.

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

From-SVN: r258902
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/builtin-offsetof3.C [new file with mode: 0644]