]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/c-common.c
PR c++/85061
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Mar 2018 19:59:30 +0000 (19:59 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Mar 2018 19:59:30 +0000 (19:59 +0000)
commit45685ee6743894a000d5156214b650cb07af6d08
treee568e6d24afab9b357d90af7039d5096786da049
parent42c29b389ddc93b6b186e4ce26fc4149a10715f7
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258902 138bc75d-0d04-0410-961f-82ee72b054a4
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]