This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set current_function_decl in {push,pop}_cfun and push_struct_function


> - ada/gcc-interface/utils.c:rest_of_subprog_body_compilation calls
>   dump_function which in turns calls dump_function_to_file which calls
>   push_cfun.  But Ada front end has its idea of the
>   current_function_decl and there is no cfun which is an inconsistency
>   which makes push_cfun assert fail.  I "solved" it by temporarily
>   setting current_function_decl to NULL_TREE.  It's just dumping and I
>   thought that dump_function should be considered middle-end and thus
>   middle-end invariants should apply.

If you think that calling dump_function from rest_of_subprog_body_compilation 
is a layering violation, I don't have a problem with replacing it with a more 
"manual" scheme like the one in c-family/c-gimplify.c:c_genericize, provided 
that this yields roughly the same output.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]