Commit 6931b3b7 by Richard Biener Committed by Richard Biener

re PR debug/70271 (internal compiler error: in dwarf2out_finish, at dwarf2out.c:27346)

2016-03-17  Richard Biener  <rguenther@suse.de>

	PR debug/70271
	* dwarf2out.c (dwarf2out_early_finish): Process deferred_asm_name
	last.

	* g++.dg/debug/pr70271.C: New testcase.

From-SVN: r234289
parent 9bc057c8
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> 2016-03-17 Jakub Jelinek <jakub@redhat.com>
PR target/70245 PR target/70245
......
...@@ -27686,10 +27686,15 @@ dwarf2out_finish (const char *filename) ...@@ -27686,10 +27686,15 @@ dwarf2out_finish (const char *filename)
static void static void
dwarf2out_early_finish (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. */ /* 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; tree decl = node->created_for;
if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl) if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)
...@@ -27703,13 +27708,6 @@ dwarf2out_early_finish (void) ...@@ -27703,13 +27708,6 @@ dwarf2out_early_finish (void)
} }
} }
deferred_asm_name = NULL; 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 /* 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> 2016-03-17 Ilya Enkovich <enkovich.gnu@gmail.com>
* gcc.target/i386/pr70251.c: New test. * gcc.target/i386/pr70251.c: New test.
......
// { 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) { });
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment