+2015-02-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR debug/46102
+ * dwarf2out.c (dwarf2out_init): Disable -feliminate-dwarf2-dups.
+
2015-02-26 Sebastian Pop <s.pop@samsung.com>
PR tree-optimization/65048
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, "-feliminate-dwarf2-dups is broken for C++, ignoring");
+ flag_eliminate_dwarf2_dups = 0;
+ }
+
/* Allocate the file_table. */
file_table = hash_table<dwarf_file_hasher>::create_ggc (50);
+2015-02-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR debug/46102
+ * g++.dg/debug/dwarf2-1.C: XFAIL and move...
+ * g++.dg/debug/dwarf2/dwarf2-1.C: ...here.
+ * g++.dg/debug/dwarf2-2.C: XFAIL and move...
+ * g++.dg/debug/dwarf2/dwarf2-2.C: ...here.
+ * g++.dg/debug/dwarf2/typedef5.C: XFAIL.
+ * g++.dg/debug/pr46123.C: XFAIL and move...
+ * g++.dg/debug/dwarf2/pr46123-2.C: ...here.
+ * gcc.dg/debug/dwarf2-3.c: Move...
+ * gcc.dg/debug/dwarf2/dwarf2-3.c: ...here.
+
2015-02-26 Marek Polacek <polacek@redhat.com>
PR c++/65202
+++ /dev/null
-// 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;
+++ /dev/null
-// PR debug/27057
-// { dg-do compile }
-// { dg-options "-g -feliminate-dwarf2-dups" }
-
-namespace N
-{
-}
-
-struct A
-{
- void foo ();
-};
-
-void A::foo ()
-{
- using namespace N;
-}
--- /dev/null
+// 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 "-feliminate-dwarf2-dups is broken for C\\+\\+, ignoring" "broken -feliminate-dwarf2-dups" { xfail *-*-* } 1 } */
--- /dev/null
+// 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 "-feliminate-dwarf2-dups is broken for C\\+\\+, ignoring" "broken -feliminate-dwarf2-dups" { xfail *-*-* } 1 } */
--- /dev/null
+// 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 "-feliminate-dwarf2-dups is broken for C\\+\\+, ignoring" "broken -feliminate-dwarf2-dups" { xfail *-*-* } 1 } */
} A;
A a;
+
+/* { dg-bogus "-feliminate-dwarf2-dups is broken for C\\+\\+, ignoring" "broken -feliminate-dwarf2-dups" { xfail *-*-* } 1 } */
+++ /dev/null
-// 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;
-}
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-/* Test -feliminate-dwarf2-dups */
-/* Contributed by Devang Patel <dpatel@apple.com> */
-
-struct point
-{
- int x;
- int y;
-};
-
--- /dev/null
+/* 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;
+}
--- /dev/null
+/* Test -feliminate-dwarf2-dups */
+/* Contributed by Devang Patel <dpatel@apple.com> */
+
+struct point
+{
+ int x;
+ int y;
+};
+