Message ID | 54EE0031.8010504@redhat.com |
---|---|
State | New |
Headers | show |
On 02/25/2015 12:02 PM, Aldy Hernandez wrote: > + if (flag_eliminate_dwarf2_dups) > + { > + warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups"); > + flag_eliminate_dwarf2_dups = 0; > + } I think we only want to disable it for C++, not all languages. Jason
On Feb 25, 2015, at 1:13 PM, Jason Merrill <jason@redhat.com> wrote: > On 02/25/2015 12:02 PM, Aldy Hernandez wrote: >> + if (flag_eliminate_dwarf2_dups) >> + { >> + warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups"); >> + flag_eliminate_dwarf2_dups = 0; >> + } > > I think we only want to disable it for C++, not all languages. And Objective-C++… if you strcmp the name in a dwarf file). Prefer flag_eliminate_dwarf2_dups = 0 in the C++ startup code someplace.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index ebf41c8..3f2837b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22621,6 +22621,13 @@ 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) + { + 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 index e90d510..913bfe5 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2-1.C @@ -20,3 +20,5 @@ namespace N } N::Derived thing; + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2-2.C b/gcc/testsuite/g++.dg/debug/dwarf2-2.C index 9e6dbd2..214bbb1 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2-2.C @@ -15,3 +15,5 @@ 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/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 index 9e115cd..f5e5f9f 100644 --- a/gcc/testsuite/g++.dg/debug/pr46123.C +++ b/gcc/testsuite/g++.dg/debug/pr46123.C @@ -45,3 +45,5 @@ int main () return 1; return 0; } + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2-3.c index f0c129c..e649dfa 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2-3.c @@ -11,3 +11,5 @@ int main() p.x = 0; p.y = 0; } + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c index d9c01d0..4d3a9e8 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c @@ -1,8 +1,10 @@ /* Test that these two options can work together. */ /* { dg-options "-gdwarf-4 -dA -feliminate-dwarf2-dups -fdebug-types-section" } */ -/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" } } */ +/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" { xfail *-*-* } } } */ /* { dg-final { scan-assembler "DW_TAG_type_unit" } } */ #include "dups-types.h" A2 a; + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */