This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [fortran] Different FUNC_DECLS with the same DECL_NAME - MAIN__ and named PROGRAM main functions [was Re: gcc-4.5-20090528 is now available]


Dave Korn wrote:
>>> +  main_identifier_node = get_identifier ("main");
>>> +  ftn_main = build_decl (FUNCTION_DECL, main_identifier_node, tmp);
>>>    ftn_main = build_decl (FUNCTION_DECL, get_identifier ("main"), tmp);
>>>       
> I just took a second look at this.  We surely didn't mean to build two decls
> and throw one away, did we?
Why have I always read

-   ftn_main = build_decl (FUNCTION_DECL, get_identifier ("main"), tmp);

although there was no "-"?


> I think the second assignment to ftn_main was supposed to have been
> deleted when the middle argument was changed. Ok if so?
Yes, of cause it should have been deleted. OK for the trunk and thanks
for spotting it!

Tobias

> gcc/fortran/ChangeLog
>
> * trans-decl.c (create_main_function): Don't build main decl twice.


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