+2018-11-14 Nathan Sidwell <nathan@acm.org>
+
+ PR debug/88006
+ PR debug/87462
+ * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
+ type list.
+
2018-11-14 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
FOR_EACH_CHILD (die, c, gcc_assert (! c->die_mark));
}
#endif
+ for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next)
+ resolve_addr (ctnode->root_die);
resolve_addr (comp_unit_die ());
move_marked_base_types ();
+2018-11-14 Nathan Sidwell <nathan@acm.org>
+
+ PR debug/88006
+ PR debug/87462
+ * g++.dg/debug/dwarf2/pr87462.C: New.
+ * g++.dg/debug/dwarf2/pr88006.C: New.
+
2018-11-14 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp0x/nsdmi-union6.C: Test locations too.
--- /dev/null
+// { dg-additional-options "-dA -std=gnu++17 -gdwarf-4 -O1 -fdebug-types-section" }
+// reject .pseudo label, but "label" is ok.
+// { dg-final { scan-assembler-not "\[^L\"\]_ZN5Test18testFuncEv" } }
+// undefined ref to _ZN5Test18testFuncEv
+
+class Test1 {
+public:
+ static int testFunc() { return 1; }
+};
+
+template <typename T,
+ T (*funcImpl)()>
+class TestWrapper {
+public:
+ static T func() __attribute((noinline)) { return (*funcImpl)(); }
+};
+
+int main() {
+ return TestWrapper<int, &Test1::testFunc>::func();
+}
--- /dev/null
+// { dg-additional-options "-dA -std=gnu++17 -gdwarf-4 -O1 -fdebug-types-section" }
+// reject .pseudo label, but "label" is ok.
+// { dg-final { scan-assembler-not "\[^\"\]_ZN3Foo4mfunEv" } }
+// undefined ref to _ZN3Foo4mfunEv
+
+struct Foo {
+ void mfun () {}
+};
+
+struct A { static constexpr bool Value = false; };
+
+template <bool> struct B { typedef int Type; };
+
+class Arg
+{
+ template <typename Unused> struct Local : A {};
+
+public:
+ template <typename Init, typename = typename B<Local<Init>::Value>::Type>
+ Arg (Init) {}
+};
+
+class Lambda {
+ static constexpr int Unused = 0;
+
+public:
+ Lambda (Arg);
+};
+
+// Generated ref to Foo::mfun in the type die of an instantiation of this
+template <void (Foo::*unused)()> struct Callable {};
+
+class I {
+ I() : lamb ([this] {}) {}
+
+ Lambda lamb;
+
+ Callable<&Foo::mfun> bm;
+};