diff options
-rw-r--r-- | gcc/c/c-typeck.cc | 2 | ||||
-rw-r--r-- | gcc/cp/typeck.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc index 1eee653..0de4662 100644 --- a/gcc/c/c-typeck.cc +++ b/gcc/c/c-typeck.cc @@ -11986,7 +11986,7 @@ build_vec_cmp (tree_code code, tree type, { tree zero_vec = build_zero_cst (type); tree minus_one_vec = build_minus_one_cst (type); - tree cmp_type = truth_type_for (type); + tree cmp_type = truth_type_for (TREE_TYPE (arg0)); tree cmp = build2 (code, cmp_type, arg0, arg1); return build3 (VEC_COND_EXPR, type, cmp, minus_one_vec, zero_vec); } diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc index 3b71932..00570f1 100644 --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -4820,7 +4820,7 @@ build_vec_cmp (tree_code code, tree type, { tree zero_vec = build_zero_cst (type); tree minus_one_vec = build_minus_one_cst (type); - tree cmp_type = truth_type_for (type); + tree cmp_type = truth_type_for (TREE_TYPE (arg0)); tree cmp = build2 (code, cmp_type, arg0, arg1); return build3 (VEC_COND_EXPR, type, cmp, minus_one_vec, zero_vec); } |