re PR c++/46977 ([C++0x] ICE: SIGSEGV in htab_find_slot_with_hash (hashtab.c:650))
authorJason Merrill <jason@redhat.com>
Fri, 21 Jan 2011 17:38:02 +0000 (12:38 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 21 Jan 2011 17:38:02 +0000 (12:38 -0500)
commitd6ed1c8903e728f4233122554bab5910853338bd
tree95871ccf683cdcd1cc68588d8d01c44cb12a7588
parente90b336fce3f8e4fe7c65301da0a48da3d9e455c
re PR c++/46977 ([C++0x] ICE: SIGSEGV in htab_find_slot_with_hash (hashtab.c:650))

PR c++/46977
* semantics.c (potential_constant_expression_1): Split out from
potential_constant_expression.  Add want_rval parm.  Handle
template expression forms.  Don't enforce restriction on address
of automatic variable here.  Add a couple of diagnostics that
had been missing.
(require_potential_constant_expression): New entry point.
(build_data_member_initialization, register_constexpr_fundef): Adjust.
(maybe_constant_value): Check potential_constant_expression.
* pt.c (fold_non_dependent_expr_sfinae): Likewise.
* tree.c (build_vec_init_expr): Adjust.

From-SVN: r169096
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C [new file with mode: 0644]