aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-01-26 22:20:40 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-01-26 22:20:40 +0100
commit81cce6f682ecac63e57d6b12514fd774808bc067 (patch)
tree108cc3d6946a03f8f4238a791385ae28eb0e8ffc /gcc
parentbef16e8723179fa878d7faf472eb960b56033996 (diff)
downloadgcc-81cce6f682ecac63e57d6b12514fd774808bc067.zip
gcc-81cce6f682ecac63e57d6b12514fd774808bc067.tar.gz
gcc-81cce6f682ecac63e57d6b12514fd774808bc067.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr47476.C10
4 files changed, 22 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 05d075f..4e5c760 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ea8a7ae..161812b 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e5133d0..527b3ed 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr47476.C b/gcc/testsuite/g++.dg/cpp0x/pr47476.C
new file mode 100644
index 0000000..1f6f09c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr47476.C
@@ -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;
+}