re PR c++/58565 ([c++11] ICE with label in statement expression)

/cp
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58565
	* semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.

/testsuite
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58565
	* g++.dg/parse/crash64.C: New.

From-SVN: r203109
This commit is contained in:
Paolo Carlini 2013-10-02 10:44:23 +00:00 committed by Paolo Carlini
parent f6fe771af1
commit 0eb3d6c6b6
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
* semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58563

View File

@ -8422,6 +8422,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case OVERLOAD:
case TEMPLATE_ID_EXPR:
case LABEL_DECL:
case LABEL_EXPR:
case CONST_DECL:
case SIZEOF_EXPR:
case ALIGNOF_EXPR:

View File

@ -1,3 +1,8 @@
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
* g++.dg/parse/crash64.C: New.
2013-10-02 Yufeng Zhang <yufeng.zhang@arm.com>
* gcc.dg/tree-ssa/slsr-40.c: New test.

View File

@ -0,0 +1,7 @@
// PR c++/58565
// { dg-options "" }
void foo()
{
int i = ({ L: ; }); // { dg-error "void value not ignored" }
}