https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81073
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Mon Jun 19 18:20:48 2017 New Revision: 249383 URL: https://gcc.gnu.org/viewcvs?rev=249383&root=gcc&view=rev Log: PR c++/81073 - constexpr and static var in statement-expression. * constexpr.c (cxx_eval_constant_expression) [DECL_EXPR]: Check potential_constant_expression. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/ext/stmtexpr19.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/constexpr.c