[Bug target/97207] [nvptx, build] nvptx.c:3539:38: error: no matching function for call to ‘swap(bracket_vec_t&, bracket_vec_t&)’

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 25 11:57:08 GMT 2020


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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/vec.h b/gcc/vec.h
index d73d865cff2..c0e577893a3 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -1546,7 +1546,12 @@ public:
       this->m_vec = r.m_vec;
       r.m_vec = NULL;
     }
-  void operator= (auto_vec&&) = delete;
+  void operator= (auto_vec&& r)
+    {
+      this->release ();
+      this->m_vec = r.m_vec;
+      r.m_vec = NULL;
+    }
 };



works for the vec.c test, Tom - can you check if it works for nvptx?


More information about the Gcc-bugs mailing list