+2016-05-11 Richard Biener <rguenther@suse.de>
+
+ PR debug/71057
+ * dwarf2out.c (retry_incomplete_types): Set early_dwarf.
+ (dwarf2out_finish): Move retry_incomplete_types call ...
+ (dwarf2out_early_finish): ... here.
+
2016-05-11 Richard Biener <rguenther@suse.de>
PR middle-end/71002
static void
retry_incomplete_types (void)
{
+ set_early_dwarf s;
int i;
for (i = vec_safe_length (incomplete_types) - 1; i >= 0; i--)
if (should_emit_struct_debug ((*incomplete_types)[i], DINFO_USAGE_DIR_USE))
gen_type_die ((*incomplete_types)[i], comp_unit_die ());
+ vec_safe_truncate (incomplete_types, 0);
}
/* Determine what tag to use for a record type. */
resolve_addr (comp_unit_die ());
move_marked_base_types ();
- /* Walk through the list of incomplete types again, trying once more to
- emit full debugging info for them. */
- retry_incomplete_types ();
-
if (flag_eliminate_unused_debug_types)
prune_unused_types ();
static void
dwarf2out_early_finish (void)
{
+ /* Walk through the list of incomplete types again, trying once more to
+ emit full debugging info for them. */
+ retry_incomplete_types ();
+
/* The point here is to flush out the limbo list so that it is empty
and we don't need to stream it for LTO. */
flush_limbo_die_list ();
--- /dev/null
+// { dg-do compile }
+// { dg-options "-g" }
+template <typename _Tp> using decay_t = _Tp;
+template <typename> struct A;
+template <typename> struct B { B(A<int>); };
+template <typename> struct C {
+ template <typename U> using constructor = B<decay_t<U>>;
+ typedef constructor<int> dummy;
+};
+template <typename> struct D {};
+C<int> a;
+D<B<int>> fn1() { fn1, a; }