I can reproduce the issue but I cannot convince myself whether this is a bug or not. It seems indeed that this only gives an error because of the way std::copy is implemented: using __builtin_memmove which has non volatile parameters.
That said this is not ARM specific so I suggest you report the bug in GCC's bugzilla instead. This will reach C++ front end maintainers of GCC who will have a more definite opinion on the question.
Please post the bugzilla number here once you have done so.
I can reproduce the issue but I cannot convince myself whether this is a bug or not. It seems indeed that this only gives an error because of the way std::copy is implemented: using __builtin_memmove which has non volatile parameters.
That said this is not ARM specific so I suggest you report the bug in GCC's bugzilla instead. This will reach C++ front end maintainers of GCC who will have a more definite opinion on the question.
Please post the bugzilla number here once you have done so.
Best regards.