Dave Korn wrote: >> Wouldn't the simplest thing be to rename the other main function - the >> initialisation one that is automatically generated by create_main_function()? >> It could be called anything different we liked, and it's not user-visible, >> so >> it ought to not be a problem to rename? >> > > Argh, no. Cygwin crt0 for one expects the entrypoint function to be called > _main in any language. Hmmm. >
In terms of -fdump-tree-original (all(?) other dumps place the assembler name in parentheses) and for the special handling of "main" in the middle end, having MAIN__ everywhere would be useful. Except for the warnings; having test.f90: In function 'helloworld': test.f90:3: warning: 'i' is used uninitialized in this function is better readable for the user than a test.f90: In function 'MAIN__': test.f90:2: warning: 'i' is used uninitialized in this function Frankly, I don't have any idea how to solve the problem while retaining the proper names in the middle-end diagnostics. But of cause on can decide that the diagnostic output is less of a problem and live with "MAIN__" in the middle-end diagnostics. (The front-end diagnostic message are not effected.) Tobias