re PR middle-end/20635 (ICE in cgraph_mark_reachable_node)
PR middle-end/20635 * varasm.c (mark_decl_referenced): Do not mark extern inline functions as needed. * compile/gcc.c-torture/compile/20050328-1.c: New testcase made by Jakub Jelinek. From-SVN: r97133
This commit is contained in:
parent
c7f599d099
commit
5c55c2e8ca
4 changed files with 39 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
2005-03-28 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR middle-end/20635
|
||||
* varasm.c (mark_decl_referenced): Do not mark extern inline functions
|
||||
as needed.
|
||||
|
||||
* tree-inline.c (estimate_num_insns_1): Use declaration to discover argument
|
||||
types where possible.
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2005-03-28 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR middle-end/20635
|
||||
* compile/gcc.c-torture/compile/20050328-1.c: New testcase made
|
||||
by Jakub Jelinek.
|
||||
|
||||
2005-03-27 Dorit Naishlos <dorit@il.ibm.com>
|
||||
|
||||
PR tree-optimization/20626
|
||||
|
|
24
gcc/testsuite/gcc.c-torture/compile/20050328-1.c
Normal file
24
gcc/testsuite/gcc.c-torture/compile/20050328-1.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
void fn1 (void *);
|
||||
void fn2 (void *);
|
||||
void foo (void);
|
||||
void bar (void);
|
||||
|
||||
extern inline void *
|
||||
baz (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
fn1 (baz ());
|
||||
fn2 (baz ());
|
||||
}
|
||||
|
||||
void
|
||||
bar (void)
|
||||
{
|
||||
fn1 (baz ());
|
||||
fn2 (baz);
|
||||
}
|
|
@ -1877,7 +1877,11 @@ void
|
|||
mark_decl_referenced (tree decl)
|
||||
{
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
cgraph_mark_needed_node (cgraph_node (decl));
|
||||
{
|
||||
/* Extern inline functions don't become needed when referenced. */
|
||||
if (!DECL_EXTERNAL (decl))
|
||||
cgraph_mark_needed_node (cgraph_node (decl));
|
||||
}
|
||||
else if (TREE_CODE (decl) == VAR_DECL)
|
||||
cgraph_varpool_mark_needed_node (cgraph_varpool_node (decl));
|
||||
/* else do nothing - we can get various sorts of CST nodes here,
|
||||
|
|
Loading…
Add table
Reference in a new issue