[Bug c++/85061] ICE with __builtin_offsetof applied to static member
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 27 20:00:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85061
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Mar 27 19:59:30 2018
New Revision: 258902
URL: https://gcc.gnu.org/viewcvs?rev=258902&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/ext/builtin-offsetof3.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list