diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index ebf41c8..270c4fd 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -22621,6 +22621,14 @@ output_macinfo (void)
 static void
 dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
 {
+  /* This option is currently broken, see (PR53118 and PR46102).  */
+  if (flag_eliminate_dwarf2_dups
+      && strstr (lang_hooks.name, "C++"))
+    {
+      warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups");
+      flag_eliminate_dwarf2_dups = 0;
+    }
+
   /* Allocate the file_table.  */
   file_table = hash_table<dwarf_file_hasher>::create_ggc (50);
 
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2-1.C b/gcc/testsuite/g++.dg/debug/dwarf2-1.C
deleted file mode 100644
index e90d510..0000000
--- a/gcc/testsuite/g++.dg/debug/dwarf2-1.C
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation, Inc.
-// Contributed by Nathan Sidwell 6 Jan 2006 <nathan@codesourcery.com>
-
-// PR 24824
-// Origin:   	 wanderer@rsu.ru
-
-// { dg-options "-feliminate-dwarf2-dups" }
-
-namespace N
-{
-  struct Base
-  {
-    int m;
-  };
-
-  struct Derived : Base
-  {
-    using Base::m;
-  };
-}
-
-N::Derived thing;
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2-2.C b/gcc/testsuite/g++.dg/debug/dwarf2-2.C
deleted file mode 100644
index 9e6dbd2..0000000
--- a/gcc/testsuite/g++.dg/debug/dwarf2-2.C
+++ /dev/null
@@ -1,17 +0,0 @@
-// PR debug/27057
-// { dg-do compile }
-// { dg-options "-g -feliminate-dwarf2-dups" }
-
-namespace N
-{
-}
-
-struct A
-{
-  void foo ();
-};
-
-void A::foo ()
-{
-  using namespace N;
-}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-1.C
new file mode 100644
index 0000000..fdef5da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-1.C
@@ -0,0 +1,24 @@
+// Copyright (C) 2006 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jan 2006 <nathan@codesourcery.com>
+
+// PR 24824
+// Origin:   	 wanderer@rsu.ru
+
+// { dg-options "-gdwarf -feliminate-dwarf2-dups" }
+
+namespace N
+{
+  struct Base
+  {
+    int m;
+  };
+
+  struct Derived : Base
+  {
+    using Base::m;
+  };
+}
+
+N::Derived thing;
+
+/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-2.C
new file mode 100644
index 0000000..643e678
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2-2.C
@@ -0,0 +1,19 @@
+// PR debug/27057
+// { dg-do compile }
+// { dg-options "-gdwarf -feliminate-dwarf2-dups" }
+
+namespace N
+{
+}
+
+struct A
+{
+  void foo ();
+};
+
+void A::foo ()
+{
+  using namespace N;
+}
+
+/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr46123-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr46123-2.C
new file mode 100644
index 0000000..f5e5f9f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr46123-2.C
@@ -0,0 +1,49 @@
+// PR debug/46123
+// { dg-do compile }
+// { dg-options "-g -feliminate-dwarf2-dups" }
+
+struct foo
+{
+  static int bar ()
+  {
+    int i;
+    static int baz = 1;
+    {
+      static int baz = 2;
+      i = baz++;
+    }
+    {
+      struct baz
+      {
+	static int m ()
+	{
+	  static int n;
+	  return n += 10;
+	}
+      };
+      baz a;
+      i += a.m ();
+    }
+    {
+      static int baz = 3;
+      i += baz;
+      baz += 30;
+    }
+    i += baz;
+    baz += 60;
+    return i;
+  }
+};
+
+int main ()
+{
+  foo x;
+
+  if (x.bar () != 16)
+    return 1;
+  if (x.bar() != 117)
+    return 1;
+  return 0;
+}
+
+/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C
index d9d058c..17ffafa 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C
@@ -8,3 +8,5 @@ typedef struct
 } A;
 
 A a;
+
+/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */
diff --git a/gcc/testsuite/g++.dg/debug/pr46123.C b/gcc/testsuite/g++.dg/debug/pr46123.C
deleted file mode 100644
index 9e115cd..0000000
--- a/gcc/testsuite/g++.dg/debug/pr46123.C
+++ /dev/null
@@ -1,47 +0,0 @@
-// PR debug/46123
-// { dg-do compile }
-// { dg-options "-g -feliminate-dwarf2-dups" }
-
-struct foo
-{
-  static int bar ()
-  {
-    int i;
-    static int baz = 1;
-    {
-      static int baz = 2;
-      i = baz++;
-    }
-    {
-      struct baz
-      {
-	static int m ()
-	{
-	  static int n;
-	  return n += 10;
-	}
-      };
-      baz a;
-      i += a.m ();
-    }
-    {
-      static int baz = 3;
-      i += baz;
-      baz += 30;
-    }
-    i += baz;
-    baz += 60;
-    return i;
-  }
-};
-
-int main ()
-{
-  foo x;
-
-  if (x.bar () != 16)
-    return 1;
-  if (x.bar() != 117)
-    return 1;
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2-3.c
deleted file mode 100644
index f0c129c..0000000
--- a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Test -feliminate-dwarf2-dups */
-/* Contributed by Devang Patel <dpatel@apple.com> */
-/* { dg-do compile } */
-/* { dg-options "-feliminate-dwarf2-dups" } */
-
-#include "dwarf2-3.h"
-
-int main()
-{
-  struct point p;
-  p.x = 0;
-  p.y = 0;
-}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-3.h b/gcc/testsuite/gcc.dg/debug/dwarf2-3.h
deleted file mode 100644
index 26ad0ba..0000000
--- a/gcc/testsuite/gcc.dg/debug/dwarf2-3.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Test -feliminate-dwarf2-dups */
-/* Contributed by Devang Patel <dpatel@apple.com> */
-
-struct point
-{
-  int x;
-  int y;
-};
-
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.c
new file mode 100644
index 0000000..e364670
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.c
@@ -0,0 +1,13 @@
+/* Test -feliminate-dwarf2-dups */
+/* Contributed by Devang Patel <dpatel@apple.com> */
+/* { dg-do compile } */
+/* { dg-options "-gdwarf -feliminate-dwarf2-dups" } */
+
+#include "dwarf2-3.h"
+
+int main()
+{
+  struct point p;
+  p.x = 0;
+  p.y = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.h b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.h
new file mode 100644
index 0000000..26ad0ba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-3.h
@@ -0,0 +1,9 @@
+/* Test -feliminate-dwarf2-dups */
+/* Contributed by Devang Patel <dpatel@apple.com> */
+
+struct point
+{
+  int x;
+  int y;
+};
+
