module reference question
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Nov 15 02:21:00 GMT 2005
On Mon, Nov 14, 2005 at 06:11:24PM -0800, Uttam Pawar wrote:
>
> Assume we have initial module.f90 file with following code,
> module module_test
> end module module_test
>
> Create module_test.mod file
>
> In a new file module_new.f90
> $ module_new.f90
> module module_test
> USE module_test
> end module module_test
>
> Compilation of the above code gives an error as below,
> "Fatal Error: Can't USE the same module we're building!". Should this
> be "Error: Can't USE the same module we're building!", instead?
>
> What's the difference between gfc_error() and gfc_fatal_error()?
>
A fatal_error occurs immediately. gfc_error actually
writes the error message to a buffer and gfortran
will continue (usually by backing up) to try parsing
a potentially different code route. If the new code
path is successful, the error message is discarded.
If the new code path fails, another error messages
is written into the next buffer location. If gfortran
fail determines that an error has indeed occurred, it
will then write an error message from the buffer(s) to
stderr.
--
Steve
More information about the Fortran
mailing list