Bummer, can't debug ieee_selected_real_kind
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Dec 30 19:45:00 GMT 2018
On Sun, Dec 30, 2018 at 08:58:09AM -0800, Steve Kargl wrote:
> On Sun, Dec 30, 2018 at 03:39:04PM +0100, Thomas Koenig wrote:
> >
> > > It seems someone hase broken the ability to use a debugger
> > > with f951 if the Fortran includes 'use ieee_arithmetic'
> >
> > I can reproduce the problem :-(
> >
> > While it is not perfect, you could use
> >
> > (gdb) r -I /home/ig25/lib/gcc/x86_64-pc-linux-gnu/9.0.0/finclude ieee.f90
> >
> > where /home/ig25 is your $(PREFIX) to get the compiler to run, at
> > least. And yes, this is a pain.
>
> Still doesn't work.
>
The logic in module.c (gfc_use_module) is confusingly messed up.
Given a module name from a USE statement such as 'ieee_arithmetic',
the function first tries to open the module as a non-intrinsic
module in lines 6967:6971. This works for 'ieee_arithmetic', because
the code that should mark 'ieee_arithmetic' as intrinsic occurs in
lines 7015-7021. But, this code is guarded by 'if (module_fp == NULL ...)
where module_fp cannot be NULL because gfortran as previously opened
the module file as non-intrinsic.
What is baffling is how does gfortran work when executed with the
'gfortran' driver instead of directly using f951?
--
Steve
More information about the Fortran
mailing list