aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-03-30 15:51:32 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-03-30 15:51:32 -0400
commite0f89433aa35e607de82a7d0f96d1a4cb2089717 (patch)
tree8f58e5fb17637371bda2003ef1bf21d389cc4aa9 /gcc
parent666a21a2993b36e8c10f2d0759cd7f68811663fb (diff)
downloadgcc-e0f89433aa35e607de82a7d0f96d1a4cb2089717.zip
gcc-e0f89433aa35e607de82a7d0f96d1a4cb2089717.tar.gz
gcc-e0f89433aa35e607de82a7d0f96d1a4cb2089717.tar.bz2
re PR c++/48369 ([C++0x] ICE in potential_constant_expression_1, at cp/semantics.c:7746)
PR c++/48369 * semantics.c (potential_constant_expression_1): Handle UNORDERED_EXPR and ORDERED_EXPR. From-SVN: r171747
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/testsuite/ChangeLog2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/isnan.C9
4 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 75f7da7..8975e6c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2011-03-30 Jason Merrill <jason@redhat.com>
+ PR c++/48369
+ * semantics.c (potential_constant_expression_1): Handle
+ UNORDERED_EXPR and ORDERED_EXPR.
+
PR c++/48281
* semantics.c (finish_compound_literal): Do put static/constant
arrays in static variables.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 74e9a9f..3300c3f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -7744,6 +7744,8 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
case TRUTH_XOR_EXPR:
+ case UNORDERED_EXPR:
+ case ORDERED_EXPR:
case UNLT_EXPR:
case UNLE_EXPR:
case UNGT_EXPR:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6ec96c9..301b5da 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,7 @@
2011-03-30 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/regress/isnan.C: New.
+
* g++.dg/cpp0x/initlist46.C: New.
2011-03-30 Richard Sandiford <richard.sandiford@linaro.org>
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C b/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C
new file mode 100644
index 0000000..40d07e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C
@@ -0,0 +1,9 @@
+// PR c++/48369
+// { dg-options -std=gnu++0x }
+
+extern "C" int isnan (double);
+
+void f(double d)
+{
+ bool b = isnan(d);
+}