[Bug c/105555] [13 Regression] ICE: in fold_offsetof, at c-family/c-common.cc:6815
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 14 07:53:56 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105555
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:20915a360388bfd6bbca603fc7a2fbdd7ba3d9d6
commit r13-10133-g20915a360388bfd6bbca603fc7a2fbdd7ba3d9d6
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Thu Feb 12 09:07:10 2026 -0800
c: Handle REALPART_EXPR and IMAGPART_EXPR in fold_offsetof [PR105555]
In some cases the C front-end calls into fold_offsetof to fold
an address but that does not handle REALPART_EXPR nor IMAGPART_EXPR so
gcc produces an internal compiler error. For offsetof,
REALPART_EXPR/IMAGPART_EXPR
won't show up which is why they were not there before.
Bootstrapped and tested on x86_64-linux-gnu.
PR c/105555
gcc/c-family/ChangeLog:
* c-common.cc (fold_offsetof): Handle REALPART_EXPR
and IMAGPART_EXPR.
gcc/testsuite/ChangeLog:
* gcc.dg/complex-10.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
(cherry picked from commit bfeb09e591b2ae629277d4ec6578c24998c77c3b)
More information about the Gcc-bugs
mailing list