[Bug c++/83993] [7 Regression] ICE: constant not recomputed when ADDR_EXPR changed
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 3 13:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83993
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sat Mar 3 13:23:43 2018
New Revision: 258181
URL: https://gcc.gnu.org/viewcvs?rev=258181&root=gcc&view=rev
Log:
Backported from mainline
2018-01-31 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/83993
* constexpr.c (cxx_eval_outermost_constant_expr): Build NOP_EXPR
around non-constant ADDR_EXPRs rather than clearing TREE_CONSTANT
on ADDR_EXPR.
* g++.dg/init/pr83993-2.C: New test.
Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/init/pr83993-2.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/constexpr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list