r236406 - in /branches/gcc-5-branch/gcc: cp/Cha...

jason@gcc.gnu.org jason@gcc.gnu.org
Wed May 18 15:58:00 GMT 2016


Author: jason
Date: Wed May 18 15:58:49 2016
New Revision: 236406

URL: https://gcc.gnu.org/viewcvs?rev=236406&root=gcc&view=rev
Log:
	Fix constexpr handling of SAVE_EXPR in loops.

	* constexpr.c (struct constexpr_ctx): Add save_exprs field.
	(cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
	(cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
	(cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-loop3.C
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-loop4.C
    branches/gcc-5-branch/gcc/testsuite/g++.dg/ubsan/pr70135.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/constexpr.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list