OSDN Git Service

PR fortran/31546
[pf3gnuchains/gcc-fork.git] / libgfortran / fmain.c
1 #include "libgfortran.h"
2
3 /* The main Fortran program actually is a function, called MAIN__.
4    We call it from the main() function in this file.  */
5 void MAIN__ (void);
6
7 /* Main procedure for fortran programs.  All we do is set up the environment
8    for the Fortran program.  */
9 int
10 main (int argc, char *argv[])
11 {
12   /* Store the path of the executable file.  */
13   store_exe_path (argv[0]);
14
15   /* Set up the runtime environment.  */
16   set_args (argc, argv);
17
18
19   /* Call the Fortran main program.  Internally this is a function
20      called MAIN__ */
21   MAIN__ ();
22
23   /* Bye-bye!  */
24   return 0;
25 }