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: [fortran,patch] Give the main program its proper name


*ping* (I know it's not been long, but since it' the week-end, some might have a bit a free time for this rather simple patch)

Attached simple patch gives the symbol for the main program its proper
name, if any (otherwise, MAIN__ is used), while its assembler name is
set to MAIN__. This allows for better error messages from the
middle-end (instead of "In function MAIN__", we get "In function bar"
if the main program is bar [1]), and also for better debugging: we can
now set breakpoints on the main program (still called bar in my
example) by typing "break bar" as well as "break MAIN__".

When this patch is in, I'll also submit a patch to the middle-end that
emits DW_AT_calling_convention to identify the main program (that's
our lowest-numbered PR, PR 10220) which can then use this information.

Bootstrapped and regtested on x86_64-linux, OK to commit? (I regtested
with Tobias' interface patch; without it, there is one failure, which
lead to isolate the bug Tobias fixed.)

FX


PS: I also fixed or trimmed down a few comments along the way.


[1] Yes, we should also make the GCC error mechanism print "In main
program 'bar'", but that's for another day ;-)


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