aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-12 22:41:19 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-12 22:41:19 +0100
commit32490940f0e59b2ad04ff9a3de172b6947c38b6c (patch)
tree95ae64f17ef44b27379ecc0be148e29290602409 /gcc
parent20c89ab7c5091ee48535392cae2177aa1a1c43eb (diff)
downloadgcc-32490940f0e59b2ad04ff9a3de172b6947c38b6c.zip
gcc-32490940f0e59b2ad04ff9a3de172b6947c38b6c.tar.gz
gcc-32490940f0e59b2ad04ff9a3de172b6947c38b6c.tar.bz2
re PR c++/83778 (g++.dg/ext/altivec-cell-2.C fails starting with r256448)
PR c++/83778 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call fold_for_warn before checking if arg2 is INTEGER_CST. From-SVN: r256599
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000-c.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9316f56..5333a67 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/83778
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
+ fold_for_warn before checking if arg2 is INTEGER_CST.
+
2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/predicates.md (load_multiple_operation): Delete.
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index b7693d0..5805d26 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -6496,6 +6496,8 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
tree call = NULL_TREE;
int nunits = GET_MODE_NUNITS (mode);
+ arg2 = fold_for_warn (arg2);
+
/* If the second argument is an integer constant, if the value is in
the expected range, generate the built-in code if we can. We need
64-bit and direct move to extract the small integer vectors. */
@@ -6640,7 +6642,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
arg0 = (*arglist)[0];
arg1 = (*arglist)[1];
arg1_type = TREE_TYPE (arg1);
- arg2 = (*arglist)[2];
+ arg2 = fold_for_warn ((*arglist)[2]);
if (TREE_CODE (arg1_type) != VECTOR_TYPE)
goto bad;