+2016-03-17 Richard Biener <rguenther@suse.de>
+
+ PR debug/70271
+ * dwarf2out.c (dwarf2out_early_finish): Process deferred_asm_name
+ last.
+
2016-03-17 Jakub Jelinek <jakub@redhat.com>
PR target/70245
static void
dwarf2out_early_finish (void)
{
- limbo_die_node *node;
+ /* 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 ();
+
+ gen_scheduled_generic_parms_dies ();
+ gen_remaining_tmpl_value_param_die_attribute ();
/* Add DW_AT_linkage_name for all deferred DIEs. */
- for (node = deferred_asm_name; node; node = node->next)
+ for (limbo_die_node *node = deferred_asm_name; node; node = node->next)
{
tree decl = node->created_for;
if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)
}
}
deferred_asm_name = NULL;
-
- /* 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 ();
-
- gen_scheduled_generic_parms_dies ();
- gen_remaining_tmpl_value_param_die_attribute ();
}
/* Reset all state within dwarf2out.c so that we can rerun the compiler
+2016-03-17 Richard Biener <rguenther@suse.de>
+
+ PR debug/70271
+ * g++.dg/debug/pr70271.C: New testcase.
+
2016-03-17 Ilya Enkovich <enkovich.gnu@gmail.com>
* gcc.target/i386/pr70251.c: New test.
--- /dev/null
+// { dg-do compile }
+
+template <typename Function>
+struct function_traits
+: public function_traits<decltype(&Function::operator())>
+{ };
+
+template <typename ClassType, typename ReturnType, typename... Args>
+struct function_traits<ReturnType(ClassType::*)(Args...) const>
+{
+ typedef ReturnType (*pointer)(Args...);
+ typedef ReturnType return_type;
+};
+
+template <typename Function>
+typename function_traits<Function>::pointer
+FunctionPointer (const Function& lambda)
+{
+ return static_cast<typename function_traits<Function>::pointer>(lambda);
+}
+
+template <typename Function>
+typename function_traits<Function>::return_type
+GetReturnValue (Function func)
+{
+ typename function_traits<Function>::return_type *dummy;
+ return *dummy;
+}
+template <typename T> class ClassFoo {};
+template <typename T> void FuncBar () { }
+
+template <> inline void FuncBar<double> ()
+{
+ typedef void (*func_type)(ClassFoo<double> &);
+ func_type f1 = FunctionPointer ([](ClassFoo<double> & ref) { });
+}