re PR c++/47476 ([C++0x] ICE in potential_constant_expression_1)

PR c++/47476
	* semantics.c (potential_constant_expression_1): Handle
	TRUTH_XOR_EXPR.

	* g++.dg/cpp0x/pr47476.C: New test.

From-SVN: r169306
This commit is contained in:
Jakub Jelinek 2011-01-26 22:20:40 +01:00 committed by Jakub Jelinek
parent bef16e8723
commit 81cce6f682
4 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR c++/47476
* semantics.c (potential_constant_expression_1): Handle
TRUTH_XOR_EXPR.
2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
PR c++/43601

View file

@ -7656,6 +7656,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
case TRUTH_XOR_EXPR:
case UNLT_EXPR:
case UNLE_EXPR:
case UNGT_EXPR:

View file

@ -1,3 +1,8 @@
2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR c++/47476
* g++.dg/cpp0x/pr47476.C: New test.
2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/compile/20110126-1.c: New test.

View file

@ -0,0 +1,10 @@
// PR c++/47476
// { dg-do compile }
// { dg-options "-std=c++0x" }
int
foo (int a, int b)
{
const bool c ((a != 0) == (b != 26));
return c;
}