Commit 6e5fba0e by Jason Merrill Committed by Jason Merrill

re PR c++/57102 (ICE: SIGSEGV in fndecl_declared_return_type with -fdump-final-insns=...)

	PR c++/57102
	* decl.c (fndecl_declared_return_type): Also look in
	DECL_SAVED_FUNCTION_DATA.

From-SVN: r199125
parent 77f8682b
2013-05-20 Jason Merrill <jason@redhat.com>
PR c++/57102
* decl.c (fndecl_declared_return_type): Also look in
DECL_SAVED_FUNCTION_DATA.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/12288
......
......@@ -14417,10 +14417,15 @@ fndecl_declared_return_type (tree fn)
{
fn = STRIP_TEMPLATE (fn);
if (FNDECL_USED_AUTO (fn))
return (DECL_STRUCT_FUNCTION (fn)->language
->x_auto_return_pattern);
else
return TREE_TYPE (TREE_TYPE (fn));
{
struct language_function *f = NULL;
if (DECL_STRUCT_FUNCTION (fn))
f = DECL_STRUCT_FUNCTION (fn)->language;
if (f == NULL)
f = DECL_SAVED_FUNCTION_DATA (fn);
return f->x_auto_return_pattern;
}
return TREE_TYPE (TREE_TYPE (fn));
}
/* Returns true iff DECL was declared with an auto return type and it has
......
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