Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-21 Thread Richard Guenther
On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 20, 2012, at 5:01 PM, Richard Guenther wrote: On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 20, 2012, at 3:19 PM, Richard Guenther wrote: [...] I'd rather get away from using a global main_identifier_node, instead

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-21 Thread Tristan Gingold
On Mar 20, 2012, at 6:17 PM, Jan Hubicka wrote: On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: [?] Well. To make this work in LTO the main function (thus, the program entry point)

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Tristan Gingold
On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: […] Well. To make this work in LTO the main function (thus, the program entry point) should be marked at cgraph level and all users of MAIN_NAME_P should instead check a flag on the cgraph

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Richard Guenther
On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: […] Well. To make this work in LTO the main function (thus, the program entry point) should be marked at cgraph level and all users of

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Tristan Gingold
On Mar 20, 2012, at 1:21 PM, Richard Guenther wrote: On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: […] Well. To make this work in LTO the main function (thus, the program entry point)

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Richard Guenther
On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 20, 2012, at 1:21 PM, Richard Guenther wrote: On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: […] Well. To make this work

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Tristan Gingold
On Mar 20, 2012, at 3:19 PM, Richard Guenther wrote: […] I'd rather get away from using a global main_identifier_node, instead make that frontend specific, and introduce targetm.main_assembler_name which the assembler-name creating langhook would make sure to use when mangling what the FE

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Richard Guenther
On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 20, 2012, at 3:19 PM, Richard Guenther wrote: […] I'd rather get away from using a global main_identifier_node, instead make that frontend specific, and introduce targetm.main_assembler_name which the assembler-name creating

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-20 Thread Tristan Gingold
On Mar 20, 2012, at 5:01 PM, Richard Guenther wrote: On Tue, 20 Mar 2012, Tristan Gingold wrote: On Mar 20, 2012, at 3:19 PM, Richard Guenther wrote: […] I'd rather get away from using a global main_identifier_node, instead make that frontend specific, and introduce

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-15 Thread Richard Guenther
On Wed, 14 Mar 2012, Tristan Gingold wrote: On Mar 14, 2012, at 5:08 PM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: Hi, the code to call expand_main_function currently only checks DECL_NAME. This leads to a hack in ada/gcc-interface/utils.c to

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-15 Thread Tristan Gingold
On Mar 15, 2012, at 10:37 AM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: On Mar 14, 2012, at 5:08 PM, Richard Guenther wrote: On Wed, 14 Mar 2012, Tristan Gingold wrote: Hi, the code to call expand_main_function currently only checks DECL_NAME. This

Re: [Patch/cfgexpand]: also consider assembler_name to call expand_main_function

2012-03-14 Thread Richard Guenther
On Wed, 14 Mar 2012, Tristan Gingold wrote: Hi, the code to call expand_main_function currently only checks DECL_NAME. This leads to a hack in ada/gcc-interface/utils.c to handle the gnatbind generated file that could declare: package ada_main is … function my_main (argc