diff --git a/Control/AthViews/test/ViewCollectionMerge_test.cxx b/Control/AthViews/test/ViewCollectionMerge_test.cxx
index ad9d17111e468be9ac00c4e80a4b8c138f73e782..b1d4f720efa3e904af6ab6bb37ca33aae294981a 100644
--- a/Control/AthViews/test/ViewCollectionMerge_test.cxx
+++ b/Control/AthViews/test/ViewCollectionMerge_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -32,8 +32,15 @@
 #include "AthenaKernel/ExtendedEventContext.h"
 
 // Google Test and Google Mock
+#if __GNUC__ >= 9
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-copy"
+#endif
 #include "gtest/gtest.h"
 #include "gmock/gmock.h"
+#if __GNUC__ >= 9
+# pragma GCC diagnostic pop
+#endif
 
 
 // Names for storing collections