This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran,patch] PR 39178 - inline main()
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>, fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 May 2009 18:52:15 +0300
- Subject: Re: [Fortran,patch] PR 39178 - inline main()
- References: <20090519223619.GA802@net-b.de> <4A1B2CAE.8000700@physik.fu-berlin.de> <4A1C5626.6030107@gmail.com> <4A1C5E0F.2090207@net-b.de>
On Wed, May 27, 2009 at 00:24, Tobias Burnus <burnus@net-b.de> wrote:
> Janne Blomqvist wrote:
>>> Bootstrapped on x86-64-linux and regtested.
>>> OK for the trunk?
>> Ok.
> Thanks for the review! Comitted as Rev. 147883.
Oops, I was a bit hasty..
I just committed the patch below as obvious. Turns out we can't remove
store_exe_path since it's part of the ABI. I also added a note about
this to http://gcc.gnu.org/wiki/LibgfortranAbiCleanup
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 85b454d..3591fa9 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -610,6 +610,9 @@ export_proto(set_args);
extern void get_args (int *, char ***);
internal_proto(get_args);
+extern void store_exe_path (const char *);
+export_proto(store_exe_path);
+
extern char * full_exe_path (void);
internal_proto(full_exe_path);
diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c
index 6df2775..3f3d494 100644
--- a/libgfortran/runtime/main.c
+++ b/libgfortran/runtime/main.c
@@ -74,7 +74,7 @@ static int please_free_exe_path_when_done;
/* Save the path under which the program was called, for use in the
backtrace routines. */
-static void
+void
store_exe_path (const char * argv0)
{
#ifndef PATH_MAX
--
Janne Blomqvist