Avoid GCC 4.1 build failure in fold-const.c
commite87f4871a1cfa553b0ca6cda8f1cbe412964e826
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2018 12:44:37 +0000 (16 12:44 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2018 12:44:37 +0000 (16 12:44 +0000)
treef9cf8f46fcc5b4270749c7fa296abe771db049c1
parent9b55749af1a3674d15a3279cf5b32e4107a7d764
Avoid GCC 4.1 build failure in fold-const.c

We had:

      tree t = fold_vec_perm (type, arg1, arg2,
      vec_perm_indices (sel, 2, nelts));

where fold_vec_perm takes a const vec_perm_indices &.  GCC 4.1 apparently
required a public copy constructor:

gcc/vec-perm-indices.h:85: error: 'vec_perm_indices::vec_perm_indices(const vec_perm_indices&)' is private
gcc/fold-const.c:11410: error: within this context

even though no copy should be made here.  This patch tries to work
around that by constructing the vec_perm_indices separately.

2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
in a separate statement.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256740 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c