aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-01-15 10:57:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-01-15 10:57:17 -0500
commitc5e3b6fc95b12720da53b81e047e77cfe63a2c3c (patch)
tree29ff3b7bf31e6fe8061a910059153de98aa36691 /gcc/cp
parentf32550199459a387e1ece1b385460cb0603cb6d5 (diff)
downloadgcc-c5e3b6fc95b12720da53b81e047e77cfe63a2c3c.zip
gcc-c5e3b6fc95b12720da53b81e047e77cfe63a2c3c.tar.gz
gcc-c5e3b6fc95b12720da53b81e047e77cfe63a2c3c.tar.bz2
re PR c++/68847 (ICE in cxx_eval_constant_expression on __atomic_compare_exchange (constexpr.c:3719) in c++)
PR c++/68847 * call.c (build_cxx_call): Use fold_non_dependent_expr. From-SVN: r232438
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/call.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fc846dc..0ad384a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2016-01-15 Jason Merrill <jason@redhat.com>
+ PR c++/68847
+ * call.c (build_cxx_call): Use fold_non_dependent_expr.
+
* typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
value.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index c05170a..ce87be7 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7755,7 +7755,7 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
/* We need to take care that values to BUILT_IN_NORMAL
are reduced. */
for (i = 0; i < nargs; i++)
- argarray[i] = maybe_constant_value (argarray[i]);
+ argarray[i] = fold_non_dependent_expr (argarray[i]);
if (!check_builtin_function_arguments (fndecl, nargs, argarray))
return error_mark_node;