Skip to content

Build fails on PPC: simd_vector_scalar.h: error: assignment of read-only location '* data' #166

@barracuda156

Description

@barracuda156
:info:build cd /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/build/tests/test_matmul && /opt/local/bin/g++-mp-12  -I/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/.. -I/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/test_matmul/../.. -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -std=gnu++14 -MD -MT tests/test_matmul/CMakeFiles/test_matmul.dir/test_matmul.cpp.o -MF CMakeFiles/test_matmul.dir/test_matmul.cpp.o.d -o CMakeFiles/test_matmul.dir/test_matmul.cpp.o -c /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/test_matmul/test_matmul.cpp
:info:build In file included from /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/simd_vector/SIMDVector.h:5,
:info:build                  from /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/Fastor.h:17,
:info:build                  from /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/test_tensormap/test_tensormap.cpp:1:
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/simd_vector/simd_vector_scalar.h: In instantiation of 'void Fastor::SIMDVector<T, Fastor::simd_abi::scalar>::store(T*, bool) const [with T = const int]':
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/tensor/TensorAssignment.h:19:42:   required from 'void Fastor::trivial_assign(AbstractTensor<Derived, DIM>&, const AbstractTensor<Derived1, DIM1>&) [with Derived = Tensor<int, 3, 1>; long unsigned int DIM = 2; OtherDerived = BinaryAddOp<TensorMap<const int, 3, 1>, TensorMap<const int, 3, 1>, 2>; long unsigned int OtherDIM = 2]'
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/expressions/binary_ops/binary_arithmetic_assignment.h:107:1:   required from 'void Fastor::assign(AbstractTensor<Derived, DIM>&, const BinaryAddOp<TLhs, TRhs, OtherDIM>&) [with Derived = Tensor<int, 3, 1>; long unsigned int DIM = 2; TLhs = TensorMap<const int, 3, 1>; TRhs = TensorMap<const int, 3, 1>; long unsigned int OtherDIM = 2; typename std::enable_if<(((! is_primitive_v_<TLhs>) && (! is_primitive_v_<TRhs>)) && (!(requires_evaluation_v<TLhs> || requires_evaluation_v<TRhs>))), bool>::type <anonymous> = false]'
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/tensor/Tensor.h:108:15:   required from 'Fastor::Tensor<T, Rest>::Tensor(const Fastor::AbstractTensor<Derived, DIMS>&) [with Derived = Fastor::BinaryAddOp<Fastor::TensorMap<const int, 3, 1>, Fastor::TensorMap<const int, 3, 1>, 2>; long unsigned int DIMS = 2; typename std::enable_if<((((! has_tensor_view_v<Derived>) && (! has_tensor_fixed_view_2d_v<Derived>)) && (! has_tensor_fixed_view_nd_v<Derived>)) || (DIMS != sizeof... (Rest))), bool>::type <anonymous> = false; T = int; long unsigned int ...Rest = {3, 1}]'
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/tensor/AbstractTensorFunctions.h:20:35:   required from 'typename Derived::result_type Fastor::evaluate(const AbstractTensor<Derived, DIM>&) [with Derived = BinaryAddOp<TensorMap<const int, 3, 1>, TensorMap<const int, 3, 1>, 2>; long unsigned int DIMS = 2; typename Derived::result_type = Tensor<int, 3, 1>]'
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/test_tensormap/test_tensormap.cpp:115:35:   required from 'void run() [with T = int]'
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/test_tensormap/test_tensormap.cpp:143:13:   required from here
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_fastor/fastor/work/Fastor-6d7216f304d60d92b9b042566d4d6e94c65086a3/tests/../Fastor/simd_vector/simd_vector_scalar.h:26:74: error: assignment of read-only location '* data'
:info:build    26 |     FASTOR_INLINE void store(T *data, bool Aligned=true) const { data[0] = value; unused(Aligned); }
:info:build       |                                                                  ~~~~~~~~^~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions