[Bug libstdc++/94353] std::copy* breaks when one type is volatile

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 27 09:21:21 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94353

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It is fixed by that commit, and there are several tests for mixed volatile
pointers e.g.

+  volatile int i[2] = { 1, 2 };
+  volatile int j[2] = { 0, 0 };
+  int k[2] = { 0, 0 };
+
+  std::copy(i, i+2, j);
+  VERIFY( j[0] == 1 && j[1] == 2 );
+  std::copy(i, i+2, k);
   ^^^^^^^^^^^^^^^^^^^^^

*** This bug has been marked as a duplicate of bug 94013 ***


More information about the Gcc-bugs mailing list