Message ID | 20110319193005.392306385@alvy.suse.cz |
---|---|
State | New |
Headers | show |
> Hi, > > it seems to me that fortran can call cgraph_create_node directly > without checking for its existence first. > > Thanks, > > Martin > > > 2011-03-18 Martin Jambor <mjambor@suse.cz> > > * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node > instead of cgraph_get_create_node. > > Index: src/gcc/fortran/trans-decl.c > =================================================================== > --- src.orig/gcc/fortran/trans-decl.c 2011-03-18 19:45:10.000000000 +0100 > +++ src/gcc/fortran/trans-decl.c 2011-03-18 19:45:12.000000000 +0100 > @@ -4924,7 +4924,7 @@ gfc_generate_function_code (gfc_namespac > if (decl_function_context (fndecl)) > /* Register this function with cgraph just far enough to get it > added to our parent's nested function list. */ > - (void) cgraph_get_create_node (fndecl); > + (void) cgraph_create_node (fndecl); this happens when function node is being build so indeed we want to create node here. Honza
Index: src/gcc/fortran/trans-decl.c =================================================================== --- src.orig/gcc/fortran/trans-decl.c 2011-03-18 19:45:10.000000000 +0100 +++ src/gcc/fortran/trans-decl.c 2011-03-18 19:45:12.000000000 +0100 @@ -4924,7 +4924,7 @@ gfc_generate_function_code (gfc_namespac if (decl_function_context (fndecl)) /* Register this function with cgraph just far enough to get it added to our parent's nested function list. */ - (void) cgraph_get_create_node (fndecl); + (void) cgraph_create_node (fndecl); else cgraph_finalize_function (fndecl, true);