Commit 83dea45d by Jakub Jelinek Committed by Jakub Jelinek

c-decl.c (c_expand_deferred_function): Only call c_expand_body if fndecl is…

c-decl.c (c_expand_deferred_function): Only call c_expand_body if fndecl is still DECL_INLINE and has DECL_RESULT.

	* c-decl.c (c_expand_deferred_function): Only call c_expand_body
	if fndecl is still DECL_INLINE and has DECL_RESULT.

	* gcc.c-torture/compile/20011119-1.c: New test.
	* gcc.c-torture/compile/20011119-2.c: New test.

From-SVN: r47240
parent a558c691
2001-11-21 Jakub Jelinek <jakub@redhat.com>
* c-decl.c (c_expand_deferred_function): Only call c_expand_body
if fndecl is still DECL_INLINE and has DECL_RESULT.
2001-11-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* clipper.c (clipper_movstr): Avoid uninitialized warning.
......
......@@ -6768,8 +6768,13 @@ void
c_expand_deferred_function (fndecl)
tree fndecl;
{
c_expand_body (fndecl, 0, 0);
current_function_decl = NULL;
/* DECL_INLINE or DECL_RESULT might got cleared after the inline
function was deferred, e.g. in duplicate_decls. */
if (DECL_INLINE (fndecl) && DECL_RESULT (fndecl))
{
c_expand_body (fndecl, 0, 0);
current_function_decl = NULL;
}
}
/* Generate the RTL for the body of FNDECL. If NESTED_P is non-zero,
......
2001-11-20 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20011119-1.c: New test.
* gcc.c-torture/compile/20011119-2.c: New test.
2001-11-17 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-1.c: Fix typo.
......
extern inline int foo (void)
{
return 23;
}
extern int foo (void) __attribute__ ((weak, alias ("xxx")));
extern inline int foo (void)
{
return 23;
}
int bar (void)
{
return foo ();
}
extern int foo (void) __attribute__ ((weak, alias ("xxx")));
int baz (void)
{
return foo ();
}
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