Hi,
As comments at PR65767 and PR65718, we should use namespace other than std
to avoid duplicated definition problem on arm-none-eabi.  This patch fixes
the issue.  It is an obvious change, but I will wait for approval because of
GCC5 branch.

Is it OK?

gcc/testsuite/ChangeLog
2015-04-20  Bin Cheng  <bin.ch...@arm.com>

        PR testsuite/65767
        * g++.dg/lto/pr65276_0.C: Change namespace std to std2.
        * g++.dg/lto/pr65276_1.C: Change namespace std to std2.
diff --git a/gcc/testsuite/g++.dg/lto/pr65276_0.C 
b/gcc/testsuite/g++.dg/lto/pr65276_0.C
index c8e9699..9c72e68 100644
--- a/gcc/testsuite/g++.dg/lto/pr65276_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr65276_0.C
@@ -7,7 +7,7 @@
 
 extern "C++"
 {
-  namespace std
+  namespace std2
   {
     class exception
     {
@@ -16,7 +16,7 @@ extern "C++"
     };
   }
 }
-namespace std
+namespace std2
 {
   struct __cow_string
   {
@@ -31,9 +31,9 @@ namespace std
     __cow_string _M_msg;
   };
 }
-namespace std
+namespace std2
 {
-  class system_error:public std::runtime_error
+  class system_error:public std2::runtime_error
   {
   };
   enum _Ios_Fmtflags
diff --git a/gcc/testsuite/g++.dg/lto/pr65276_1.C 
b/gcc/testsuite/g++.dg/lto/pr65276_1.C
index ee49752..dafa4fc 100644
--- a/gcc/testsuite/g++.dg/lto/pr65276_1.C
+++ b/gcc/testsuite/g++.dg/lto/pr65276_1.C
@@ -3,7 +3,7 @@
 #pragma interface
 extern "C++"
 {
-  namespace std
+  namespace std2
   {
     class exception
     {
@@ -12,7 +12,7 @@ extern "C++"
     };
   }
 }
-namespace std
+namespace std2
 {
   struct __cow_string
   {

Reply via email to